-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
newSingleThreadContext on Native can't close until timeouts finish #3768
Comments
Before the change, the Worker is not notified about its work being cancelled, due to no API being present for that. We work around the issue by checking every 100 milliseconds whether cancellation happened. Fixes #3768
A work-around seems to be to use |
After some more testing, it seems that the above fix hits another bug. Trying to use the closed dispatcher doesn't throw an This problematic behavior only occurs on Coroutines 1.6.4. On 1.7.0 and 1.71 an IllegalStateException is correctly thrown immediately.
|
Reported in the Kotlin Slack originally.
Simplified reproducer:
The text was updated successfully, but these errors were encountered: