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

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Thread

Synopsis

Documentation

class Member Thread l => EffectThread l #

Instances

Member (* -> *) Thread l => EffectThread l # 

data Thread a #

An effect that describes concurrent computation.

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

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

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

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

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

Executes a threaded computation asynchronously.

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

Yields to the next available thread.

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

Forks a child thread.

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

Immediately terminates the current thread.