This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ©2012 Viktor Klang | |
object MiniActor { | |
import java.util.concurrent.{ConcurrentLinkedQueue, Executor} | |
import java.util.concurrent.atomic.AtomicInteger | |
type Behavior = Any => Effect | |
sealed trait Effect extends (Behavior => Behavior) | |
case object Stay extends Effect { def apply(old: Behavior): Behavior = old } |