not.hDuplicate
Peter Simons
simons at cryp.to
Sun May 15 08:07:28 EDT 2005
Bulat Ziganshin writes:
> one thread gives to another handle of open file. i need
> to read some data from this file. how can i accomplish
> this?
Keep the Handle in an MVar at all times, then access to it
will be synchronized between threads:
http://haskell.org/ghc/docs/latest/html/libraries/base/Control.Concurrent.MVar.html
If you need more background on this stuff, this paper is the
one you want to read:
http://research.microsoft.com/Users/simonpj/papers/marktoberdorf/
Peter
More information about the Glasgow-haskell-users
mailing list