Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
threadStatus# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, Int#, Int# #)base GHC.Base Get the status of the given thread. Result is (ThreadStatus, Capability, Locked) where ThreadStatus is one of the status constants defined in rts/Constants.h, Capability is the number of the capability which currently owns the thread, and Locked is a boolean indicating whether the thread is bound to that capability.
waitRead# :: Int# -> State# d -> State# dbase GHC.Base Block until input is available on specified file descriptor.
ThreadBlocked :: BlockReason -> ThreadStatusbase GHC.Conc the thread is blocked on some resource
-
base GHC.Conc the thread received an uncaught exception
ThreadFinished :: ThreadStatusbase GHC.Conc the thread has finished
-
base GHC.Conc A ThreadId is an abstract type representing a handle to a thread. ThreadId is an instance of Eq, Ord and Show, where the Ord instance implements an arbitrary total ordering over ThreadIds. The Show instance lets you convert an arbitrary-valued ThreadId to string form; showing a ThreadId value is occasionally useful when debugging or diagnosing the behaviour of a concurrent program. Note: in GHC, if you have a ThreadId, you essentially have a pointer to the thread itself. This means the thread itself can't be garbage collected until you drop the ThreadId. This misfeature would be difficult to correct while continuing to support threadStatus.
ThreadId :: ThreadId# -> ThreadIdbase GHC.Conc No documentation available.
-
base GHC.Conc the thread is currently runnable or running
-
base GHC.Conc The current status of a thread
killThread :: ThreadId -> IO ()base GHC.Conc killThread raises the ThreadKilled exception in the given thread (GHC only).
killThread tid = throwTo tid ThreadKilled