-
Notifications
You must be signed in to change notification settings - Fork 1.9k
withContext(IO) blocks thread #524
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
Comments
Could you please provide a small reproducer? Can it be a bug in |
I've seen similar over the last few days of giving the Looks like the same trace as above though, from the thread calling
Edit: not using either Vert.x or similar blocking thread monitoring, simply waiting until |
We're starting to put together coroutines outreach for Android. We're planning on recommending the IO pool - but want to make sure this issue is resolved before we recommend it widely. I'll follow this issue, if the work migrates to another issue can you paste it here? |
@objcode We are cleaning up and finalizing API for 1.0 release of this library, so I'd suggest to also watch for issues with "for 1.0 release" label: https://github.com/Kotlin/kotlinx.coroutines/issues?q=is%3Aissue+is%3Aopen+label%3A%22for+1.0+release%22 |
@elizarov @qwwdfsad I just ran into this too, but can't get a consistent repro. This should be a stop-the-world issue since it occurs randomly and completely halts the main thread. I managed to capture a few extra details to help you debug:
|
Shouldn't this issue have its labels updated? (like having the bug label in place of the current one) |
Currently we are using Vert.x web for HTTP server, and uses
JedisPool
for Redis client.Since that Redis client has a blocking API, we used
withContext(IO)
to not block the Vert.x thread.But the Vert.x thread is blocked by
withContext
.Coroutines version is "0.25.0",
Vertx version is "3.5.3".
Where the
...
is 3 lines of our code.I would love to understand things under the hood but currently we will just use the non-blocking Redis client to avoid the problem first.
The text was updated successfully, but these errors were encountered: