Skip to content

Instantly share code, notes, and snippets.


Some Dude ericacm

View GitHub Profile
View minscalaactors.scala
// ©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 }
You can’t perform that action at this time.