Fixing inverted logic
This commit is contained in:
parent
bcfd70f6e0
commit
388ec810bf
1 changed files with 1 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ private[akka] abstract class Mailbox(val actor: ActorCell) extends MessageQueue
|
||||||
private final def processMailbox(): Unit = if (dispatcher.isThroughputDefined) process(dispatcher.throughput) else process(1)
|
private final def processMailbox(): Unit = if (dispatcher.isThroughputDefined) process(dispatcher.throughput) else process(1)
|
||||||
|
|
||||||
@tailrec private final def process(left: Int, deadlineNs: Long = if (dispatcher.isThroughputDeadlineTimeDefined) System.nanoTime + dispatcher.throughputDeadlineTime.toNanos else 0l): Unit =
|
@tailrec private final def process(left: Int, deadlineNs: Long = if (dispatcher.isThroughputDeadlineTimeDefined) System.nanoTime + dispatcher.throughputDeadlineTime.toNanos else 0l): Unit =
|
||||||
if ((shouldProcessMessage) && (left > 0 || (dispatcher.isThroughputDeadlineTimeDefined && System.nanoTime >= deadlineNs))) {
|
if ((left > 0) && (shouldProcessMessage) && (!dispatcher.isThroughputDeadlineTimeDefined || System.nanoTime < deadlineNs)) {
|
||||||
val next = dequeue()
|
val next = dequeue()
|
||||||
if (next ne null) {
|
if (next ne null) {
|
||||||
if (Mailbox.debug) println(actor.self + " processing message " + next)
|
if (Mailbox.debug) println(actor.self + " processing message " + next)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue