Merge pull request #1276 from akka/wip-3170-deadlock-in-calling-thread-dispatcher-ban
Return of the DefaultSystemMessageQueue fixes. #3170
This commit is contained in:
commit
86fdfcd22f
1 changed files with 7 additions and 2 deletions
|
|
@ -392,10 +392,15 @@ private[akka] trait DefaultSystemMessageQueue { self: Mailbox ⇒
|
|||
@tailrec
|
||||
final def systemDrain(newContents: LatestFirstSystemMessageList): EarliestFirstSystemMessageList = {
|
||||
val currentList = systemQueueGet
|
||||
if (systemQueuePut(currentList, newContents)) currentList.reverse else systemDrain(newContents)
|
||||
if (currentList.head == NoMessage) new EarliestFirstSystemMessageList(null)
|
||||
else if (systemQueuePut(currentList, newContents)) currentList.reverse
|
||||
else systemDrain(newContents)
|
||||
}
|
||||
|
||||
def hasSystemMessages: Boolean = systemQueueGet.nonEmpty
|
||||
def hasSystemMessages: Boolean = systemQueueGet.head match {
|
||||
case null | NoMessage ⇒ false
|
||||
case _ ⇒ true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue