Update documentation for hWaitForInput
authorSimon Marlow <simonmar@microsoft.com>
Tue, 7 Nov 2006 11:14:30 +0000 (11:14 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 7 Nov 2006 11:14:30 +0000 (11:14 +0000)
See #972
Merge to 6.6 branch.

GHC/IO.hs

index f248914..096cff0 100644 (file)
--- a/GHC/IO.hs
+++ b/GHC/IO.hs
@@ -64,13 +64,15 @@ import GHC.Conc
 -- or 'False' if no input is available within @t@ milliseconds.
 --
 -- If @t@ is less than zero, then @hWaitForInput@ waits indefinitely.
--- NOTE: in the current implementation, this is the only case that works
--- correctly (if @t@ is non-zero, then all other concurrent threads are
--- blocked until data is available).
 --
 -- This operation may fail with:
 --
 --  * 'isEOFError' if the end of file has been reached.
+--
+-- NOTE for GHC users: unless you use the @-threaded@ flag,
+-- @hWaitForInput t@ where @t >= 0@ will block all other Haskell
+-- threads for the duration of the call.  It behaves like a
+-- @safe@ foreign call in this respect.
 
 hWaitForInput :: Handle -> Int -> IO Bool
 hWaitForInput h msecs = do