From: Simon Marlow Date: Tue, 7 Nov 2006 11:14:30 +0000 (+0000) Subject: Update documentation for hWaitForInput X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e0243d8af333996441d6fb814f3c74bbf99b8dc3;p=haskell-directory.git Update documentation for hWaitForInput See #972 Merge to 6.6 branch. --- diff --git a/GHC/IO.hs b/GHC/IO.hs index f248914..096cff0 100644 --- 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