Skip to content

Commit 1ff5fd5

Browse files
authored
EmbeddedEventLoop/Channel: check correct thread (#2951)
### 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
1 parent 9140817 commit 1ff5fd5

5 files changed

Lines changed: 145 additions & 55 deletions

File tree

0 commit comments

Comments
 (0)