diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala index 274c58c53f..63cd39db62 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala @@ -161,7 +161,7 @@ abstract class MessageDispatcher(val configurator: MessageDispatcherConfigurator */ final def attach(actor: ActorCell): Unit = { register(actor) - registerForExecution(actor.mailbox, false, true) + registerForExecution(actor.mailbox, hasMessageHint = false, hasSystemMessageHint = true) } /** @@ -289,7 +289,7 @@ abstract class MessageDispatcher(val configurator: MessageDispatcherConfigurator protected[pekko] def resume(actor: ActorCell): Unit = { val mbox = actor.mailbox if ((mbox.actor eq actor) && (mbox.dispatcher eq this) && mbox.resume()) - registerForExecution(mbox, false, false) + registerForExecution(mbox, hasMessageHint = false, hasSystemMessageHint = false) } /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala index f2292a9e50..79afca38ac 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala @@ -106,7 +106,7 @@ private[pekko] class BalancingDispatcher( override protected[pekko] def dispatch(receiver: ActorCell, invocation: Envelope) = { messageQueue.enqueue(receiver.self, invocation) - if (!registerForExecution(receiver.mailbox, false, false)) teamWork() + if (!registerForExecution(receiver.mailbox, hasMessageHint = false, hasSystemMessageHint = false)) teamWork() } protected def teamWork(): Unit = @@ -118,7 +118,7 @@ private[pekko] class BalancingDispatcher( case lm: LoadMetrics => !lm.atFullThrottle() case _ => true }) - && !registerForExecution(i.next.mailbox, false, false)) + && !registerForExecution(i.next.mailbox, hasMessageHint = false, hasSystemMessageHint = false)) scheduleOne(i) scheduleOne() diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala index 53e09b96f0..96b82f9a5c 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala @@ -86,7 +86,7 @@ class Dispatcher( protected[pekko] def systemDispatch(receiver: ActorCell, invocation: SystemMessage): Unit = { val mbox = receiver.mailbox mbox.systemEnqueue(receiver.self, invocation) - registerForExecution(mbox, false, true) + registerForExecution(mbox, hasMessageHint = false, hasSystemMessageHint = true) } /** diff --git a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala index 6eb61bed96..e2b0e97959 100644 --- a/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala +++ b/actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala @@ -230,7 +230,7 @@ private[pekko] abstract class Mailbox(val messageQueue: MessageQueue) } } finally { setAsIdle() // Volatile write, needed here - dispatcher.registerForExecution(this, false, false) + dispatcher.registerForExecution(this, hasMessageHint = false, hasSystemMessageHint = false) } } diff --git a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala index 80052e1e8f..7cc0480779 100644 --- a/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala +++ b/bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala @@ -153,7 +153,7 @@ object TellOnlyBenchmark { mbox.enqueue(receiver.self, invocation) mbox.messageQueue match { case mb: DroppingMessageQueue if mb.dropping => // do nothing - case _ => registerForExecution(mbox, true, false) + case _ => registerForExecution(mbox, hasMessageHint = true, hasSystemMessageHint = false) } } }