[Haskell-cafe] Re: Hugs vs GHC (again) was:
simonmar at microsoft.com
Tue Jan 11 07:39:09 EST 2005
On 11 January 2005 11:39, Marcin 'Qrczak' Kowalczyk wrote:
> Ben Rudiak-Gould <Benjamin.Rudiak-Gould at cl.cam.ac.uk> writes:
> "fileRead :: File -> FileOffset -> Integer -> Buffer -> IO ()"
> This is unimplementable safely if the descriptor is read concurrently
> by different processes. The current position is shared.
There's a big lock on File. If you want to do truly concurrent reading,
you can make multiple FileInputStreams, each of which has its own file
descriptor (the Unix implementation uses dup(2)).
More information about the Haskell-Cafe