Skip to content

Commit

Permalink
Add note about duplicate PeriodicTimer messages when actors are busy (
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Nov 25, 2024
1 parent 4ae4792 commit 0141b6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Akka/Actor/Scheduler/TimerScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ public object InterceptTimerMsg(ILoggingAdapter log, ITimerMsg timerMsg)
return null; // message should be ignored
}

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

0 comments on commit 0141b6a

Please sign in to comment.