effin-0.3.0.2: A Typeable-free implementation of extensible effects

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Thread

Synopsis

Documentation

class Member Thread l => EffectThread l Source #

Instances

data Thread a Source #

An effect that describes concurrent computation.

runMain :: Effect (Thread :+ l) () -> Effect l () Source #

Executes a threaded computation synchronously. Completes when the main thread exits.

runSync :: Effect (Thread :+ l) () -> Effect l () Source #

Executes a threaded computation synchronously. Does not complete until all threads have exited.

runAsync :: Effect (Thread :+ (Lift IO :+ Nil)) () -> IO () Source #

Executes a threaded computation asynchronously.

yield :: EffectThread l => Effect l () Source #

Yields to the next available thread.

fork :: EffectThread l => Effect l () -> Effect l () Source #

Forks a child thread.

abort :: EffectThread l => Effect l () Source #

Immediately terminates the current thread.