chore: Add boolean parameter name when call registerForExecution (#2173)

This commit is contained in:
He-Pin(kerr) 2025-09-07 20:09:45 +08:00 committed by GitHub
parent c87b3cff72
commit 8d9450b19e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 7 deletions

View file

@ -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)
}
/**

View file

@ -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()

View file

@ -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)
}
/**

View file

@ -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)
}
}

View file

@ -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)
}
}
}