mirror of
https://github.com/apple/swift-nio
synced 2026-11-30 05:28:44 +00:00
Motivation: NIO 1.3.1 was TSan clean but `master` regressed. In total I could see two breakages both proudly presented by `SocketChannelLifecycleManager`. Sorry :| : 1. accessing the `isActiveAtomic` from arbitrary threads: this was clearly a bug because `SocketChannelLifecycleManager` is usually held mutabe. So `isActiveAtomic` needs to be injected into `SocketChannelLifecycleManager` rather than contstructed there 2. accessing the `ChannelPipeline` through `SocketChannelLifecycleManager`: same problem as above really. Modifications: inject both the ChannelPipeline and the isActiveAtomic in the appropriate places. Result: NIO much more correct, TSan happy