Removed trailing whitespace
This commit is contained in:
parent
a06f1ffb7b
commit
3687b6f6e4
134 changed files with 939 additions and 940 deletions
|
|
@ -11,18 +11,18 @@ import se.scalablesolutions.akka.actor.{Actor, ActorRef, ActorMessageInvoker}
|
|||
|
||||
/**
|
||||
* Dedicates a unique thread for each actor passed in as reference. Served through its messageQueue.
|
||||
*
|
||||
*
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
class ThreadBasedDispatcher(actor: ActorRef) extends MessageDispatcher {
|
||||
private val name = actor.getClass.getName + ":" + actor.uuid
|
||||
private val threadName = "thread-based:dispatcher:" + name
|
||||
private val threadName = "thread-based:dispatcher:" + name
|
||||
private val messageHandler = new ActorMessageInvoker(actor)
|
||||
private val queue = new BlockingMessageQueue(name)
|
||||
private var selectorThread: Thread = _
|
||||
@volatile private var active: Boolean = false
|
||||
|
||||
def dispatch(invocation: MessageInvocation) = queue.append(invocation)
|
||||
def dispatch(invocation: MessageInvocation) = queue.append(invocation)
|
||||
|
||||
def start = if (!active) {
|
||||
active = true
|
||||
|
|
@ -37,7 +37,7 @@ class ThreadBasedDispatcher(actor: ActorRef) extends MessageDispatcher {
|
|||
}
|
||||
selectorThread.start
|
||||
}
|
||||
|
||||
|
||||
def isShutdown = !active
|
||||
|
||||
def usesActorMailbox = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue