Safe Haskell | None |
---|---|
Language | Haskell2010 |
Minimalistic actor library.
Documentation
Actor, which processes the messages of type message
.
An abstraction over the message channel, thread-forking and killing.
Construction
An actor which cannot die by itself unless explicitly killed.
Given an interpreter of messages, forks a thread to run the computation on and produces a handle to address that actor.
Killing that actor will make it process all the messages in the queue first. All the messages sent to it after killing won't be processed.
An actor which cannot die by itself unless explicitly killed.
Given an interpreter of messages, forks a thread to run the computation on and produces a handle to address that actor.
:: (IO message -> IO ()) | A message receiver loop. When the loop exits, the actor dies |
-> IO (Actor message) |
An actor, whose interpreter can decide that the actor should die.
Given an implementation of a receiver loop of messages, forks a thread to run that receiver on and produces a handle to address that actor.