class
CallingThreadDispatcher extends MessageDispatcher
Instance Constructors
-
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
final
def
attach(actor: ActorCell): Unit
-
-
def
clone(): AnyRef
-
-
-
final
def
detach(actor: ActorCell): Unit
-
-
-
-
-
-
-
-
-
def
execute(runnable: Runnable): Unit
-
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
def
id: String
-
final
def
inhabitants: Long
-
final
def
isInstanceOf[T0]: Boolean
-
final
val
isThroughputDeadlineTimeDefined: Boolean
-
-
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
-
def
registerForExecution(mbox: Mailbox, hasMessageHint: Boolean, hasSystemMessageHint: Boolean): Boolean
-
def
reportFailure(t: Throwable): Unit
-
final
def
resubmitOnBlock: Boolean
-
-
def
shutdown(): Unit
-
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
-
def
throughput: Int
-
-
def
toString(): String
-
final
def
unbatchedExecute(r: Runnable): Unit
-
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
Dispatcher which runs invocations on the current thread only. This dispatcher does not create any new threads, but it can be used from different threads concurrently for the same actor. The dispatch strategy is to run on the current thread unless the target actor is either suspendSwitch or already running on the current thread (if it is running on a different thread, then this thread will block until that other invocation is finished); if the invocation is not run, it is queued in a thread-local queue to be executed once the active invocation further up the call stack finishes. This leads to completely deterministic execution order if only one thread is used.
Suspending and resuming are global actions for one actor, meaning they can affect different threads, which leads to complications. If messages are queued (thread-locally) during the suspendSwitch period, the only thread to run them upon resume is the thread actually calling the resume method. Hence, all thread-local queues which are not currently being drained (possible, since suspend-queue-resume might happen entirely during an invocation on a different thread) are scooped up into the current thread-local queue which is then executed. It is possible to suspend an actor from within its call stack.
1.1