hsdev-0.1.3.0: 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 

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

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

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

Run task in separate thread