mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: EmbeddedChannel advanced time to the distant future so that all scheduled tasks would be run. However, if tasks were recursively scheduled by executing the already scheduled tasks then the channel would never finish. Modifications: When calling finish() on EmbeddedChannel, only run the tasks which have been scheduled at that point in time. Result: Recursively scheduled tasks terminate when finish-ing the EmbeddedChannel.