[Haskell-cafe] File locking wishlist
bulat.ziganshin at gmail.com
Thu Jun 5 12:45:48 EDT 2008
Thursday, June 5, 2008, 7:22:44 PM, you wrote:
> * Only one instance of the program runs at a time.
> * If new events come in while the program runs, it should re-run itself
> * There is information attached to the events (only one Bool ATM)
> So I’d like to implement something with this, or a similar, interface:
isn't it better to provide os-independent interface to semaphores?
named semaphores both on windows and unix may be used to implement
functionality you required and it's a more natural way
there is useful article  which describes both windows and unix way to
threads/events/semaphores/mutexes. how about implementing lightweight
library which abstracts over these differences?
OTOH, i've just recalled one C++ library which does exactly this job .
may be providing Haskell interface for it will be a better idea?
 Abstraction of multitasking, file IO and socket IO for Unix and
Windows systems http://www.garret.ru/~knizhnik/sal-108.zip
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe