[Haskell-cafe] One-shot? (was: Global variables and stuff)

Graham Klyne gk at ninebynine.org
Thu Nov 11 06:44:17 EST 2004


At 11:31 11/11/04 +0000, Keean Schupke wrote:
>>Wouldn't it be easier to simply define "once" as a common Haskell library 
>>function?
>
>Erm, it is a library function (I provided the NamedSem library as an 
>attachment)... Are you suggesting it would be nice to be able to do this 
>without talking to the OS?

OK, I didn't sufficiently emphasize *common* library function.  Maybe I 
should have said "standard".

I'm not suggesting that the calling program should not use the operating 
system, but that it should be insulated from the details of said OS.  Not 
all OSes have process IDs or named semaphores.  This discussion has shown 
many ways to implement "once", and which is best may depend upon the 
underlying OS.

#g


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell-Cafe mailing list