mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
### Motivation: When scheduling tasks with the same deadline the current order of execution is undefined. Fixes https://github.com/apple/swift-nio/issues/1541 ### Modifications: In my previous PR https://github.com/apple/swift-nio/pull/2010, I added an internal id to every `ScheduledTask` to give them an identity for cancellation purposes. In this PR, I am now using the same id to also ensure that the execution of tasks with the same deadline is the same as the order they were scheduled in. ### Result: `ScheduledTask`s are now executed in their scheduled order when they have the same deadline.