mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
### Motivation: `EmbeddedChannel` & `EmbeddedEventLoop` currently violate `Sendable`. They should store the current thread in `init` and then implement `inEventLoop` and other functions with a check that the current thread is correct. Since NIO 1.0 `Embedded*` were always documented to not be thread-safe but we should finally police this. ### Modifications: - Implement the thread check - For now, just warn (soon hopefully crash) - Delete EmbeddedScheduledCallbackTests (#2950) ### Result: - Less Embedded* abuse - fixes #2949