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

Safe HaskellNone
LanguageHaskell2010

Control.Effect.Thread

Synopsis

Documentation

data Thread a Source

An effect that describes concurrent computation.

Instances

runMain :: Effect (Thread : es) () -> Effect es () Source

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

runSync :: Effect (Thread : es) () -> Effect es () Source

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

runAsync :: Effect `[Thread, Lift IO]` () -> IO () Source

Executes a threaded computation asynchronously.

yield :: EffectThread es => Effect es () Source

Yields to the next available thread.

fork :: EffectThread es => Effect es () -> Effect es () Source

Forks a child thread.

abort :: EffectThread es => Effect es () Source

Immediately terminates the current thread.