use forward in stead of send when stealing work from another actor

This commit is contained in:
Jan Van Besien 2010-03-30 13:11:03 +02:00
parent 067cc73a8f
commit 62cdb9fc23

View file

@ -168,9 +168,7 @@ class ExecutorBasedEventDrivenWorkStealingDispatcher(_name: String) extends Mess
private def donateMessage(receiver: Actor, thief: Actor): Option[MessageInvocation] = {
val donated = receiver._mailbox.pollLast
if (donated != null) {
//TODO: forward seems to fail from time to time ?!
//thief.forward(donated.message)(Some(donated.receiver))
thief.send(donated.message)
thief.forward(donated.message)(Some(donated.receiver))
return Some(donated)
} else return None
}