hGetContents and threadWaitRead?
Mon, 17 Jun 2002 07:14:13 -0700
you should never have to use any of these primops
directly when working with Handles, nor have to worry
about handles being shared among different Concurrent
Haskell threads. The IO implementation takes care of
it for you.
Well, that's assuming the platform you're working on
supports non-blocking file descriptors and select()ing
on them -- Win32 doesn't, but changes are coming
along which adds non-blocking I/O support for that
----- Original Message -----
From: "MR K P SCHUPKE" <email@example.com>
Sent: Monday, June 17, 2002 03:24
Subject: hGetContents and threadWaitRead?
> Whilst everyone is discussing threads, does anybody know if
> hGetContentsis well behaved with respect to threads - ie does
> it use threadWaitRead internally? I know it uses unsafePerfomIO,
> is a function that interleaves IO using unsafePerformIO automatically
> haskell-thread safe? - also do I need to use threadWaitWrite
> before any hPut - or do the hPut functions do this internally?
> Keean Schupke.