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

StackOverflowError caused by two yield calls #242

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

tsegismont
Copy link
Contributor

Backported from #240

See vert-x3#233

As an optimization, VertxCoroutineExecutor used to execute the command immediately if running on the right context (the context provided at creation time or one of its duplicates).

But this is not compliant with the CoroutineDispacther contract: invocations of dispatch should actually defer execution.

Instead, we introduce a custom CoroutineDispatcher that implements isDispatchNeeded.
This method shall return false in the optimization can be applied.

Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
@tsegismont tsegismont merged commit 7772d69 into vert-x3:4.4 Oct 6, 2023
3 checks passed
@tsegismont tsegismont deleted the backport-240-to-4-4 branch October 6, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant