-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve delay calculation for scheduled expiration
When the TimerWheel is used with the new `Scheduler` option, the delay to the next expiration event has to be calculated. This was scanning wheels and buckets sequentially (165 total) in the adjusted order and returning the first time period found. This missed that a cascade operations may occur, which could bring down an event that fires earlier. Thus the bucket in the next wheel has to be peek'd at and the minimum delay taken. This doesn't change functionality, but merely improves the promptness of the new active expiration feature (disabled by default).
- Loading branch information
Showing
5 changed files
with
374 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.