diff --git a/akka-actor/src/main/scala/akka/dataflow/DataFlowVariable.scala b/akka-actor/src/main/scala/akka/dataflow/DataFlowVariable.scala index 5b72503c43..9becd42e48 100644 --- a/akka-actor/src/main/scala/akka/dataflow/DataFlowVariable.scala +++ b/akka-actor/src/main/scala/akka/dataflow/DataFlowVariable.scala @@ -11,7 +11,7 @@ import akka.actor.{Actor, ActorRef} import akka.actor.Actor._ import akka.dispatch.CompletableFuture import akka.AkkaException -import akka.japi.{ Function, SideEffect } +import akka.japi.{ Function, Effect } /** * Implements Oz-style dataflow (single assignment) variables. @@ -28,10 +28,10 @@ object DataFlow { */ def thread(body: => Unit): Unit = spawn(body) - /** Executes the supplied SideEffect in another thread + /** Executes the supplied Effect in another thread * JavaAPI */ - def thread(body: SideEffect): Unit = spawn(body.apply) + def thread(body: Effect): Unit = spawn(body.apply) /** Executes the supplied function in another thread */ diff --git a/akka-actor/src/main/scala/akka/japi/JavaAPI.scala b/akka-actor/src/main/scala/akka/japi/JavaAPI.scala index 88732a4efc..4454ed117a 100644 --- a/akka-actor/src/main/scala/akka/japi/JavaAPI.scala +++ b/akka-actor/src/main/scala/akka/japi/JavaAPI.scala @@ -20,6 +20,13 @@ trait SideEffect { def apply: Unit } +/** + * An executable piece of code that takes no parameters and doesn't return any value. + */ +trait Effect { + def apply: Unit +} + /** + * A constructor/factory, takes no parameters but creates a new value of type T every call + */