Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix the Vert.x event loop integration #1103

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Jan 9, 2025

The Vert.x event loop integration used to assume that all Vert.x threads always have a current context associated. That isn't necessarily true, especially in case of worker threads, where a task can easily be submitted to the worker thread pool as an ordinary thread pool, outside of a Vert.x context. In that case, the thread cannot be treated as an event loop.

Additionally, this commit synchronizes the thread offload fallback function with the thread offload strategy, so that if there's an event loop remembered, the fallback is executed on it instead of the main executor.

The Vert.x event loop integration used to assume that all Vert.x threads
always have a current context associated. That isn't necessarily true,
especially in case of worker threads, where a task can easily be submitted
to the worker thread pool as an ordinary thread pool, outside of a Vert.x
context. In that case, the thread cannot be treated as an event loop.

Additionally, this commit synchronizes the thread offload fallback function
with the thread offload strategy, so that if there's an event loop
remembered, the fallback is executed on it instead of the main executor.
@Ladicek Ladicek added this to the 6.7.3 milestone Jan 9, 2025
@Ladicek Ladicek merged commit 0a82020 into smallrye:main Jan 9, 2025
16 checks passed
@Ladicek Ladicek deleted the fix-vertx-event-loop branch January 9, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant