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.
myThreadId# :: State# RealWorld -> (# State# RealWorld, ThreadId# #)ghc-internal GHC.Internal.Base No documentation available.
setThreadAllocationCounter# :: Int64# -> State# RealWorld -> State# RealWorldghc-internal GHC.Internal.Base Sets the allocation counter for the current thread to the given value.
threadLabel# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, ByteArray# #)ghc-internal GHC.Internal.Base Get the label of the given thread. Morally of type ThreadId# -> IO (Maybe ByteArray#), with a 1# tag denoting Just.
threadStatus# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, Int#, Int# #)ghc-internal GHC.Internal.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# dghc-internal GHC.Internal.Base Block until input is available on specified file descriptor.
isCurrentThreadBound :: IO Boolghc-internal GHC.Internal.Conc.Bound Returns True if the calling thread is bound, that is, if it is safe to use foreign libraries that rely on thread-local state from the calling thread.
rtsSupportsBoundThreads :: Boolghc-internal GHC.Internal.Conc.Bound True if bound threads are supported. If rtsSupportsBoundThreads is False, isCurrentThreadBound will always return False and both forkOS and runInBoundThread will fail.
runInBoundThread :: IO a -> IO aghc-internal GHC.Internal.Conc.Bound Run the IO computation passed as the first argument. If the calling thread is not bound, a bound thread is created temporarily. runInBoundThread doesn't finish until the IO computation finishes. You can wrap a series of foreign function calls that rely on thread-local state with runInBoundThread so that you can use them without knowing whether the current thread is bound.
runInUnboundThread :: IO a -> IO aghc-internal GHC.Internal.Conc.Bound Run the IO computation passed as the first argument. If the calling thread is bound, an unbound thread is created temporarily using forkIO. runInBoundThread doesn't finish until the IO computation finishes. Use this function only in the rare case that you have actually observed a performance loss due to the use of bound threads. A program that doesn't need its main thread to be bound and makes heavy use of concurrency (e.g. a web server), might want to wrap its main action in runInUnboundThread. Note that exceptions which are thrown to the current thread are thrown in turn to the thread that is executing the given computation. This ensures there's always a way of killing the forked thread.
-
ghc-internal GHC.Internal.Conc.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. Be careful not to exceed maxBound :: Int, which on 32-bit machines is only 2147483647 μs, less than 36 minutes. Consider using Control.Concurrent.Thread.Delay.delay from unbounded-delays package.