Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
ghc-internal GHC.Internal.Conc.Sync The current status of a thread
fromThreadId :: ThreadId -> Word64ghc-internal GHC.Internal.Conc.Sync Map a thread to an integer identifier which is unique within the current process.
killThread :: ThreadId -> IO ()ghc-internal GHC.Internal.Conc.Sync killThread raises the ThreadKilled exception in the given thread (GHC only).
killThread tid = throwTo tid ThreadKilled
labelThread :: ThreadId -> String -> IO ()ghc-internal GHC.Internal.Conc.Sync labelThread stores a string as identifier for this thread. This identifier will be used in the debugging output to make distinction of different threads easier (otherwise you only have the thread state object's address in the heap). It also emits an event to the RTS eventlog.
labelThreadByteArray# :: ThreadId -> ByteArray# -> IO ()ghc-internal GHC.Internal.Conc.Sync labelThreadByteArray# sets the label of a thread to the given UTF-8 encoded string contained in a ByteArray#.
-
ghc-internal GHC.Internal.Conc.Sync List the Haskell threads of the current process.
mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)ghc-internal GHC.Internal.Conc.Sync Make a weak pointer to a ThreadId. It can be important to do this if you want to hold a reference to a ThreadId while still allowing the thread to receive the BlockedIndefinitely family of exceptions (e.g. BlockedIndefinitelyOnMVar). Holding a normal ThreadId reference will prevent the delivery of BlockedIndefinitely exceptions because the reference could be used as the target of throwTo at any time, which would unblock the thread. Holding a Weak ThreadId, on the other hand, will not prevent the thread from receiving BlockedIndefinitely exceptions. It is still possible to throw an exception to a Weak ThreadId, but the caller must use deRefWeak first to determine whether the thread still exists.
-
ghc-internal GHC.Internal.Conc.Sync Returns the ThreadId of the calling thread (GHC only).
showThreadId :: ThreadId -> Stringghc-internal GHC.Internal.Conc.Sync No documentation available.
threadCapability :: ThreadId -> IO (Int, Bool)ghc-internal GHC.Internal.Conc.Sync Returns the number of the capability on which the thread is currently running, and a boolean indicating whether the thread is locked to that capability or not. A thread is locked to a capability if it was created with forkOn.