Skip to content

Commit 0141b6a

Browse files
Add note about duplicate PeriodicTimer messages when actors are busy (#7396)
1 parent 4ae4792 commit 0141b6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/Akka/Actor/Scheduler/TimerScheduler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ public object InterceptTimerMsg(ILoggingAdapter log, ITimerMsg timerMsg)
293293
return null; // message should be ignored
294294
}
295295

296+
// N.B. - repeating timers never change their generation, so this check always passes.
297+
// This means that, in theory, a repeating timer can queue up the same message many times
298+
// in the actor's mailbox (i.e. when actor is busy) and there's no means of de-duplicating it.
296299
if (timerMsg.Generation == timer.Generation)
297300
{
298301
// valid timer

0 commit comments

Comments
 (0)