fix some bugs, but probably not the pesky ones
- enqueuing system messages to DeadLetterMailbox was broken in principle, but not in practice for the current default deadLetter implementation - add assert that system messages are not enqueued multiple times - *BusSpec was using incorrect compareSubscribers based on identityHashCode, so moved the proper solution out of BalancingDispatcher and into akka.util.Helpers and reuse that in all places
This commit is contained in:
parent
9a10953219
commit
3808853845
5 changed files with 25 additions and 16 deletions
|
|
@ -244,6 +244,7 @@ trait DefaultSystemMessageQueue { self: Mailbox ⇒
|
|||
|
||||
@tailrec
|
||||
final def systemEnqueue(message: SystemMessage): Unit = {
|
||||
assert(message.next eq null)
|
||||
if (Mailbox.debug) println(actor + " having enqueued " + message)
|
||||
val head = systemQueueGet
|
||||
/*
|
||||
|
|
@ -253,7 +254,10 @@ trait DefaultSystemMessageQueue { self: Mailbox ⇒
|
|||
* Hence, SystemMessage.next does not need to be volatile.
|
||||
*/
|
||||
message.next = head
|
||||
if (!systemQueuePut(head, message)) systemEnqueue(message)
|
||||
if (!systemQueuePut(head, message)) {
|
||||
message.next = null
|
||||
systemEnqueue(message)
|
||||
}
|
||||
}
|
||||
|
||||
@tailrec
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue