base-4.3.0.0: Basic libraries

Portabilitynon-portable (GHC extensions)
Stabilityinternal
Maintainercvs-ghc@haskell.org

GHC.Conc.IO

Contents

Description

Basic concurrency stuff.

Synopsis

Documentation

Waiting

threadDelay :: Int -> IO ()

Suspends the current thread for a given number of microseconds (GHC only).

There is no guarantee that the thread will be rescheduled promptly when the delay has expired, but the thread will never continue to run earlier than specified.

registerDelay :: Int -> IO (TVar Bool)

Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.

threadWaitRead :: Fd -> IO ()

Block the current thread until data is available to read on the given file descriptor (GHC only).

threadWaitWrite :: Fd -> IO ()

Block the current thread until data can be written to the given file descriptor (GHC only).