Modifications after review
This commit is contained in:
parent
42d3328815
commit
61e0bd568b
1 changed files with 3 additions and 3 deletions
|
|
@ -174,15 +174,15 @@ private[akka] abstract class Mailbox(val actor: ActorCell) extends MessageQueue
|
|||
* Process the messages in the mailbox
|
||||
*/
|
||||
@tailrec private final def processMailbox(
|
||||
left: Int = java.lang.Math.min(dispatcher.throughput, 1),
|
||||
deadlineNs: Long = if (dispatcher.isThroughputDeadlineTimeDefined) System.nanoTime + dispatcher.throughputDeadlineTime.toNanos else 0l): Unit =
|
||||
left: Int = java.lang.Math.max(dispatcher.throughput, 1),
|
||||
deadlineNs: Long = if (dispatcher.isThroughputDeadlineTimeDefined) System.nanoTime + dispatcher.throughputDeadlineTime.toNanos else 0L): Unit =
|
||||
if (shouldProcessMessage) {
|
||||
val next = dequeue()
|
||||
if (next ne null) {
|
||||
if (Mailbox.debug) println(actor.self + " processing message " + next)
|
||||
actor invoke next
|
||||
processAllSystemMessages()
|
||||
if ((left > 1) && (!dispatcher.isThroughputDeadlineTimeDefined || System.nanoTime < deadlineNs))
|
||||
if ((left > 1) && ((!dispatcher.isThroughputDeadlineTimeDefined) || (System.nanoTime - deadlineNs) < 0))
|
||||
processMailbox(left - 1, deadlineNs)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue