hsdev-0.1.3.2: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references etc.

Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Concurrent.Task

Synopsis

Documentation

data Task a Source

Task result

Constructors

Task 

Instances

taskWaitStart :: Task a -> IO Bool Source

Wait until task starts or be cancelled, returns True if started

taskWait :: Task a -> IO (Either SomeException a) Source

Wait for task

taskKill :: Task a -> IO () Source

Kill task

taskCancel :: Task a -> IO Bool Source

Cancel task if it is not started yet

taskStop :: Task a -> IO Bool Source

Cancel or kill task, returns whether it was cancelled

runTask :: (MonadCatch m, MonadIO m, MonadIO n) => (m () -> n ()) -> m a -> n (Task a) Source

runTask_ :: (MonadCatch m, MonadIO m, MonadIO n) => (Task a -> m () -> n ()) -> m a -> n (Task a) Source

forkTask :: IO a -> IO (Task a) Source

Run task in separate thread