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.

  1. labelThread :: ThreadId -> String -> IO ()

    base GHC.Conc

    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.

  2. listThreads :: IO [ThreadId]

    base GHC.Conc

    List the Haskell threads of the current process.

  3. mkWeakThreadId :: ThreadId -> IO (Weak ThreadId)

    base GHC.Conc

    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.

  4. myThreadId :: IO ThreadId

    base GHC.Conc

    Returns the ThreadId of the calling thread (GHC only).

  5. threadCapability :: ThreadId -> IO (Int, Bool)

    base GHC.Conc

    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.

  6. threadDelay :: Int -> IO ()

    base GHC.Conc

    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.

  7. threadStatus :: ThreadId -> IO ThreadStatus

    base GHC.Conc

    Query the current execution status of a thread.

  8. threadWaitRead :: Fd -> IO ()

    base GHC.Conc

    Block the current thread until data is available to read on the given file descriptor (GHC only). This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with threadWaitRead, use closeFdWith.

  9. threadWaitReadSTM :: Fd -> IO (STM (), IO ())

    base GHC.Conc

    Returns an STM action that can be used to wait for data to read from a file descriptor. The second returned value is an IO action that can be used to deregister interest in the file descriptor.

  10. threadWaitWrite :: Fd -> IO ()

    base GHC.Conc

    Block the current thread until data can be written to the given file descriptor (GHC only). This will throw an IOError if the file descriptor was closed while this thread was blocked. To safely close a file descriptor that has been used with threadWaitWrite, use closeFdWith.

Page 441 of many | Previous | Next