Skip to content

Commit 8d9450b

Browse files
authored
chore: Add boolean parameter name when call registerForExecution (#2173)
1 parent c87b3cf commit 8d9450b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

actor/src/main/scala/org/apache/pekko/dispatch/AbstractDispatcher.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ abstract class MessageDispatcher(val configurator: MessageDispatcherConfigurator
161161
*/
162162
final def attach(actor: ActorCell): Unit = {
163163
register(actor)
164-
registerForExecution(actor.mailbox, false, true)
164+
registerForExecution(actor.mailbox, hasMessageHint = false, hasSystemMessageHint = true)
165165
}
166166

167167
/**
@@ -289,7 +289,7 @@ abstract class MessageDispatcher(val configurator: MessageDispatcherConfigurator
289289
protected[pekko] def resume(actor: ActorCell): Unit = {
290290
val mbox = actor.mailbox
291291
if ((mbox.actor eq actor) && (mbox.dispatcher eq this) && mbox.resume())
292-
registerForExecution(mbox, false, false)
292+
registerForExecution(mbox, hasMessageHint = false, hasSystemMessageHint = false)
293293
}
294294

295295
/**

actor/src/main/scala/org/apache/pekko/dispatch/BalancingDispatcher.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private[pekko] class BalancingDispatcher(
106106

107107
override protected[pekko] def dispatch(receiver: ActorCell, invocation: Envelope) = {
108108
messageQueue.enqueue(receiver.self, invocation)
109-
if (!registerForExecution(receiver.mailbox, false, false)) teamWork()
109+
if (!registerForExecution(receiver.mailbox, hasMessageHint = false, hasSystemMessageHint = false)) teamWork()
110110
}
111111

112112
protected def teamWork(): Unit =
@@ -118,7 +118,7 @@ private[pekko] class BalancingDispatcher(
118118
case lm: LoadMetrics => !lm.atFullThrottle()
119119
case _ => true
120120
})
121-
&& !registerForExecution(i.next.mailbox, false, false))
121+
&& !registerForExecution(i.next.mailbox, hasMessageHint = false, hasSystemMessageHint = false))
122122
scheduleOne(i)
123123

124124
scheduleOne()

actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Dispatcher(
8686
protected[pekko] def systemDispatch(receiver: ActorCell, invocation: SystemMessage): Unit = {
8787
val mbox = receiver.mailbox
8888
mbox.systemEnqueue(receiver.self, invocation)
89-
registerForExecution(mbox, false, true)
89+
registerForExecution(mbox, hasMessageHint = false, hasSystemMessageHint = true)
9090
}
9191

9292
/**

actor/src/main/scala/org/apache/pekko/dispatch/Mailbox.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private[pekko] abstract class Mailbox(val messageQueue: MessageQueue)
230230
}
231231
} finally {
232232
setAsIdle() // Volatile write, needed here
233-
dispatcher.registerForExecution(this, false, false)
233+
dispatcher.registerForExecution(this, hasMessageHint = false, hasSystemMessageHint = false)
234234
}
235235
}
236236

bench-jmh/src/main/scala/org/apache/pekko/actor/TellOnlyBenchmark.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ object TellOnlyBenchmark {
153153
mbox.enqueue(receiver.self, invocation)
154154
mbox.messageQueue match {
155155
case mb: DroppingMessageQueue if mb.dropping => // do nothing
156-
case _ => registerForExecution(mbox, true, false)
156+
case _ => registerForExecution(mbox, hasMessageHint = true, hasSystemMessageHint = false)
157157
}
158158
}
159159
}

0 commit comments

Comments
 (0)