Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
class
(
Monad
m,
Eq
(
ThreadId
m),
Ord
(
ThreadId
m),
Show
(
ThreadId
m)) =>
MonadThread
m
where
- type ThreadId m :: Type
- myThreadId :: m ( ThreadId m)
- labelThread :: ThreadId m -> String -> m ()
-
class
MonadThread
m =>
MonadFork
m
where
- forkIO :: m () -> m ( ThreadId m)
- forkIOWithUnmask :: (( forall a. m a -> m a) -> m ()) -> m ( ThreadId m)
- throwTo :: Exception e => ThreadId m -> e -> m ()
- killThread :: ThreadId m -> m ()
- yield :: m ()
- labelThisThread :: MonadThread m => String -> m ()
- fork :: MonadFork m => m () -> m ( ThreadId m)
- forkWithUnmask :: MonadFork m => (( forall a. m a -> m a) -> m ()) -> m ( ThreadId m)
Documentation
class ( Monad m, Eq ( ThreadId m), Ord ( ThreadId m), Show ( ThreadId m)) => MonadThread m where Source #
myThreadId :: m ( ThreadId m) Source #
labelThread :: ThreadId m -> String -> m () Source #
Instances
MonadThread IO Source # | |
MonadThread m => MonadThread ( ReaderT r m) Source # | |
class MonadThread m => MonadFork m where Source #
forkIO , forkIOWithUnmask , throwTo , yield
forkIO :: m () -> m ( ThreadId m) Source #
forkIOWithUnmask :: (( forall a. m a -> m a) -> m ()) -> m ( ThreadId m) Source #
throwTo :: Exception e => ThreadId m -> e -> m () Source #
killThread :: ThreadId m -> m () Source #
Instances
MonadFork IO Source # | |
Defined in Control.Monad.Class.MonadFork |
|
MonadFork m => MonadFork ( ReaderT e m) Source # | |
Defined in Control.Monad.Class.MonadFork forkIO :: ReaderT e m () -> ReaderT e m ( ThreadId ( ReaderT e m)) Source # forkIOWithUnmask :: (( forall a. ReaderT e m a -> ReaderT e m a) -> ReaderT e m ()) -> ReaderT e m ( ThreadId ( ReaderT e m)) Source # throwTo :: Exception e0 => ThreadId ( ReaderT e m) -> e0 -> ReaderT e m () Source # killThread :: ThreadId ( ReaderT e m) -> ReaderT e m () Source # |
labelThisThread :: MonadThread m => String -> m () Source #
Apply the label to the current thread
Deprecated API
forkWithUnmask :: MonadFork m => (( forall a. m a -> m a) -> m ()) -> m ( ThreadId m) Source #
Deprecated: use forkIO