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.
tryWithRead :: MonadConc m => RWLock m -> m a -> m (Maybe a)concurrency Control.Concurrent.Classy.RWLock 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.
waitRead :: MonadConc m => RWLock m -> m ()concurrency Control.Concurrent.Classy.RWLock - 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 :: MonadConc m => RWLock m -> m a -> m aconcurrency Control.Concurrent.Classy.RWLock 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.
tryReadTBQueue :: MonadSTM stm => TBQueue stm a -> stm (Maybe a)concurrency Control.Concurrent.Classy.STM.TBQueue A version of readTBQueue which does not retry. Instead it returns Nothing if no value is available.
tryReadTChan :: MonadSTM stm => TChan stm a -> stm (Maybe a)concurrency Control.Concurrent.Classy.STM.TChan A version of readTChan which does not retry. Instead it returns Nothing if no value is available.
tryReadTMVar :: MonadSTM stm => TMVar stm a -> stm (Maybe a)concurrency Control.Concurrent.Classy.STM.TMVar Try to read from a TMVar without emptying, returning Nothing if it is empty.
tryReadTQueue :: MonadSTM stm => TQueue stm a -> stm (Maybe a)concurrency Control.Concurrent.Classy.STM.TQueue A version of readTQueue which does not retry. Instead it returns Nothing if no value is available.
isCurrentThreadBound :: MonadConc m => m Boolconcurrency Control.Monad.Conc.Class 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. This will always be false if your program is not compiled with the threaded runtime.
killThread :: MonadConc m => ThreadId m -> m ()concurrency Control.Monad.Conc.Class Raise the ThreadKilled exception in the target thread. Note that if the thread is prepared to catch this exception, it won't actually kill it.
myThreadId :: MonadConc m => m (ThreadId m)concurrency Control.Monad.Conc.Class Get the ThreadId of the current thread.