Portability | non-portable (GHC extensions) |
---|---|
Stability | internal |
Maintainer | cvs-ghc@haskell.org |
Basic concurrency stuff.
- ensureIOManagerIsRunning :: IO ()
- threadDelay :: Int -> IO ()
- registerDelay :: Int -> IO (TVar Bool)
- threadWaitRead :: Fd -> IO ()
- threadWaitWrite :: Fd -> IO ()
Documentation
Waiting
threadDelay :: Int -> IO ()Source
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)Source
Set the value of returned TVar to True after a given number of microseconds. The caveats associated with threadDelay also apply.
threadWaitRead :: Fd -> IO ()Source
Block the current thread until data is available to read on the given file descriptor (GHC only).
threadWaitWrite :: Fd -> IO ()Source
Block the current thread until data can be written to the given file descriptor (GHC only).