mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-12-03 00:45:08 +03:00
Add failing bound thread signifiers. Closes #22.
This commit is contained in:
parent
772aba80d0
commit
aa0202a5af
@ -7,10 +7,19 @@
|
||||
-- monads.
|
||||
module Control.Monad.Conc.Class
|
||||
( MonadConc(..)
|
||||
|
||||
-- * Utilities
|
||||
, spawn
|
||||
, forkFinally
|
||||
, killThread
|
||||
|
||||
-- * Bound Threads
|
||||
|
||||
-- | @MonadConc@ does not support bound threads, if you need that
|
||||
-- sort of thing you will have to use regular @IO@.
|
||||
|
||||
, rtsSupportsBoundThreads
|
||||
, isCurrentThreadBound
|
||||
) where
|
||||
|
||||
import Control.Concurrent (forkIO)
|
||||
@ -311,6 +320,14 @@ forkFinally action and_then =
|
||||
killThread :: MonadConc m => ThreadId m -> m ()
|
||||
killThread tid = throwTo tid ThreadKilled
|
||||
|
||||
-- | Provided for compatibility, always returns 'False'.
|
||||
rtsSupportsBoundThreads :: Bool
|
||||
rtsSupportsBoundThreads = False
|
||||
|
||||
-- | Provided for compatibility, always returns 'False'.
|
||||
isCurrentThreadBound :: MonadConc m => m Bool
|
||||
isCurrentThreadBound = return False
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Transformer instances
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user