-
Notifications
You must be signed in to change notification settings - Fork 128
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
Quarkus + Mutiny Kotlin - io.vertx.core.VertxException: Thread blocked #733
Comments
/cc @heubeck |
Thank you @pwlan for reporting this issue, hope to find some time for looking into it. There are general issues when having embedded coroutine scopes on the same dispatcher: https://youtrack.jetbrains.com/issue/KT-44245 (just collecting some random thoughts). Short explaination about Edit: Having said this, of course a consumer of the Maybe @evanchooly as an expert in Coroutine stuff can quickly verify, if there's a conceptual mistake in https://github.com/smallrye/smallrye-mutiny/blob/main/kotlin/src/main/kotlin/io/smallrye/mutiny/coroutines/Multi.kt#L25 ? 🙏 |
Wow, that was quick. Sure, i can give it a test later today. |
Ok, i gave the fix a test. But it does not seem to fix this issue. What did I do:
Attachment I hope this helps. PS: I can mitigate the issue by simply changing the dispatcher.
|
The attaching to the calling coroutine context on the onItem thread caused a deadlock under some circumstances. Reported issue was about RestEasy Reactive using suspend routing methods on the vertx coroutine dispatcher. Signed-off-by: Florian Heubeck <[email protected]>
The attaching to the calling coroutine context on the onItem thread caused a deadlock under some circumstances. Reported issue was about RestEasy Reactive using suspend routing methods on the vertx coroutine dispatcher. Signed-off-by: Florian Heubeck <[email protected]>
Fix Issue #733: Not attaching to calling coroutine context anymore
Hey @pwlan , |
Sounds great. Thanks for all the effort and good work!! |
Context
Hi,
I am devleoping a simple Reactive REST + Mongo service that uses quarkus, kotlin coroutines and mutiny-kotlin.
Description
When converting a
Multi
to a koltinFlow
within the rest endpoint, i get anio.vertx.core.VertxException: Thread blocked
exception.Example code:
Calling this rest endpoint yields the following exception and is then seemingly blocked indefinitely.
I assume it may be the call to
runBlocking
in theMultiKt$asFlow
function.Thanks for any help on the matter.
Additional details
java11
mutiny-kotlin:1.1.2 and 1.0.0
quarkus:2.2.3.Final
kotlin:1.5.21
The text was updated successfully, but these errors were encountered: