Merge remote branch 'origin/master' into logging

BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
This commit is contained in:
Roland 2011-11-09 14:56:05 +01:00
commit a747ef7856
190 changed files with 3076 additions and 9153 deletions

View file

@ -104,7 +104,7 @@ private[testkit] object CallingThreadDispatcher {
* @author Roland Kuhn
* @since 1.1
*/
class CallingThreadDispatcher(_app: AkkaApplication, val name: String = "calling-thread", val warnings: Boolean = true) extends MessageDispatcher(_app) {
class CallingThreadDispatcher(_app: AkkaApplication, val name: String = "calling-thread") extends MessageDispatcher(_app) {
import CallingThreadDispatcher._
protected[akka] override def createMailbox(actor: ActorCell) = new CallingThreadMailbox(this, actor)
@ -165,18 +165,12 @@ class CallingThreadDispatcher(_app: AkkaApplication, val name: String = "calling
val queue = mbox.queue
val execute = mbox.suspendSwitch.fold {
queue.push(handle)
if (warnings && handle.channel.isInstanceOf[Promise[_]]) {
app.mainbus.publish(Warning(this, "suspendSwitch, creating Future could deadlock; target: %s" format receiver))
}
false
} {
queue.push(handle)
if (queue.isActive) {
if (warnings && handle.channel.isInstanceOf[Promise[_]]) {
app.mainbus.publish(Warning(this, "blocked on this thread, creating Future could deadlock; target: %s" format receiver))
}
if (queue.isActive)
false
} else {
else {
queue.enter
true
}
@ -214,11 +208,6 @@ class CallingThreadDispatcher(_app: AkkaApplication, val name: String = "calling
try {
if (Mailbox.debug) println(mbox.actor + " processing message " + handle)
mbox.actor.invoke(handle)
if (warnings) handle.channel match {
case f: ActorPromise if !f.isCompleted
app.mainbus.publish(Warning(this, "calling %s with message %s did not reply as expected, might deadlock" format (mbox.actor, handle.message)))
case _
}
true
} catch {
case ie: InterruptedException