mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: Curently adding multiple channel handlers makes a call to the async version of addHandler for each handler resulting in n+1 futures. It feels better to use just one future and add all the handlers synchoronously. Modifications: Change sync functions with take a promise to instead return a Result. Feed this back until reaching addHandlers. Result: Multiple handlers can be added more quickly.