Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EmbeddedScheduledCallbackTests: violates EmbeddedEventLoop requirements #2950

Closed
weissi opened this issue Oct 24, 2024 · 1 comment
Closed

Comments

@weissi
Copy link
Member

weissi commented Oct 24, 2024

EmbeddedScheduledCallbackTests uses EmbeddedEventLoop as if it were thread safe, that's not right.

Lukasa pushed a commit that referenced this issue Oct 25, 2024
### 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
@Lukasa
Copy link
Contributor

Lukasa commented Oct 25, 2024

Resolved in #2951.

@Lukasa Lukasa closed this as completed Oct 25, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants