Lightweight actor system HEAVILY inspired by the scalaz actors
scalaz actors would have been a good fit except a heavyweight dependency
is very undesirable. In addition, the actors defined below support the
ask pattern, returning a Future[Any] that will be fulfilled by the result
of the function used to build the actor.
As an actor begins with a synchronizing operation, any mutable state that
it closes over should be updated when it begins processing its mailbox. If it
interacts with shared mutable state that will be modified by other threads at
the same time, the same memory safety rules apply.
Lightweight actor system HEAVILY inspired by the scalaz actors scalaz actors would have been a good fit except a heavyweight dependency is very undesirable. In addition, the actors defined below support the ask pattern, returning a Future[Any] that will be fulfilled by the result of the function used to build the actor.
As an actor begins with a synchronizing operation, any mutable state that it closes over should be updated when it begins processing its mailbox. If it interacts with shared mutable state that will be modified by other threads at the same time, the same memory safety rules apply.