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.
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
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.
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.
-
concurrent-extra Control.Concurrent.ReadWriteLock Create a new RWLock in the "read" state; only read can be acquired without blocking.
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.
tryAcquireRead :: RWLock -> IO Boolconcurrent-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.
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.
-
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 l = mask_ $ acquireRead l >> releaseRead l
withRead :: RWLock -> IO a -> IO aconcurrent-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.
outputThreads :: OutputHandle -> TMVar Integerconcurrent-output System.Console.Concurrent.Internal No documentation available.