Hoogle Search

Within LTS Haskell 24.68 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. threadDelay :: MonadConc m => Int -> m ()

    concurrency Control.Monad.Conc.Class

    Yields the current thread, and optionally suspends the current thread for a given number of microseconds. If suspended, 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.

    threadDelay _ = yield
    

  2. tryReadMVar :: MonadConc m => MVar m a -> m (Maybe a)

    concurrency Control.Monad.Conc.Class

    Attempt to read a value from a MVar non-blockingly, returning a Just if there is something there, otherwise returning Nothing. As with readMVar, this does not "remove" the value.

  3. acquireRead :: RWLock -> IO ()

    concurrent-extra Control.Concurrent.ReadWriteLock

    Acquire the read lock. Blocks if another thread has acquired write access. If acquireRead terminates without throwing an exception the state of the RWLock will be "read". Implementation note: Throws an exception when more than (maxBound :: Int) simultaneous threads acquire the read lock. But that is unlikely.

  4. newAcquiredRead :: IO RWLock

    concurrent-extra Control.Concurrent.ReadWriteLock

    Create a new RWLock in the "read" state; only read can be acquired without blocking.

  5. releaseRead :: RWLock -> IO ()

    concurrent-extra Control.Concurrent.ReadWriteLock

    Release the read lock. If the calling thread was the last one to relinquish read access the state will revert to "free". It is an error to release read access to an RWLock which is not in the "read" state.

  6. tryAcquireRead :: RWLock -> IO Bool

    concurrent-extra Control.Concurrent.ReadWriteLock

    Try to acquire the read lock; non blocking. Like acquireRead, but doesn't block. Returns True if the resulting state is "read", False otherwise.

  7. tryWithRead :: RWLock -> IO a -> IO (Maybe a)

    concurrent-extra Control.Concurrent.ReadWriteLock

    A non-blocking withRead. First tries to acquire the lock. If that fails, Nothing is returned. If it succeeds, the computation is performed. When the computation terminates, whether normally or by raising an exception, the lock is released and Just the result of the computation is returned.

  8. waitRead :: RWLock -> IO ()

    concurrent-extra Control.Concurrent.ReadWriteLock

    • When the state is "write", waitRead blocks until a call to releaseWrite in another thread changes the state to "free".
    • When the state is "free" or "read" waitRead returns immediately.
    waitRead does not alter the state of the lock. Note that waitRead is just a convenience function defined as:
    waitRead l = mask_ $ acquireRead l >> releaseRead l
    

  9. withRead :: RWLock -> IO a -> IO a

    concurrent-extra Control.Concurrent.ReadWriteLock

    A convenience function wich first acquires read access and then performs the computation. When the computation terminates, whether normally or by raising an exception, the read lock is released.

  10. outputThreads :: OutputHandle -> TMVar Integer

    concurrent-output System.Console.Concurrent.Internal

    No documentation available.

Page 689 of many | Previous | Next