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.

  1. runInBoundThread :: IO a -> IO a

    forkable-monad Control.Concurrent.Forkable

    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.

  2. runInUnboundThread :: IO a -> IO a

    forkable-monad Control.Concurrent.Forkable

    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.

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

    forkable-monad Control.Concurrent.Forkable

    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.

  4. threadDelay :: Int -> IO ()

    forkable-monad Control.Concurrent.Forkable

    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.

  5. threadWaitRead :: Fd -> IO ()

    forkable-monad Control.Concurrent.Forkable

    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.

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

    forkable-monad Control.Concurrent.Forkable

    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.

  7. threadWaitWrite :: Fd -> IO ()

    forkable-monad Control.Concurrent.Forkable

    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.

  8. threadWaitWriteSTM :: Fd -> IO (STM (), IO ())

    forkable-monad Control.Concurrent.Forkable

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

  9. tryReadMVar :: MVar a -> IO (Maybe a)

    forkable-monad Control.Concurrent.Forkable

    A non-blocking version of readMVar. The tryReadMVar function returns immediately, with Nothing if the MVar was empty, or Just a if the MVar was full with contents a.

  10. AlreadyInitializedContext :: FreenectException

    freenect Freenect

    Trying to initialize a context that was already initialized.

Page 845 of many | Previous | Next