fix CallingThreadMailbox.hasMessages, see #1918

This commit is contained in:
Roland 2012-04-03 15:38:54 +02:00
parent bcbe878ec6
commit e9a6c16bdc
2 changed files with 17 additions and 0 deletions

View file

@ -291,6 +291,11 @@ class CallingThreadMailbox(_receiver: ActorCell, val mailboxType: MailboxType) e
}
}
override def enqueue(receiver: ActorRef, msg: Envelope): Unit = throw new UnsupportedOperationException("CallingThreadMailbox cannot enqueue normally")
override def dequeue(): Envelope = throw new UnsupportedOperationException("CallingThreadMailbox cannot dequeue normally")
override def hasMessages: Boolean = q.get.q.hasMessages
override def numberOfMessages: Int = -1
def queue = q.get
val ctdLock = new ReentrantLock