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

ExperimentalCoroutineDispatcher fails to close #748

Closed
cy6erGn0m opened this issue Oct 22, 2018 · 0 comments
Closed

ExperimentalCoroutineDispatcher fails to close #748

cy6erGn0m opened this issue Oct 22, 2018 · 0 comments
Assignees

Comments

@cy6erGn0m
Copy link
Contributor

cy6erGn0m commented Oct 22, 2018

I get KNPE when attempting to close dispatcher

Caused by: kotlin.KotlinNullPointerException
	at kotlinx.coroutines.scheduling.CoroutineScheduler.shutdown(CoroutineScheduler.kt:307)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.close(CoroutineScheduler.kt:295)
	at kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher.close(Dispatcher.kt:70)

This is very special case that happens when a SecurityManager was introduced and tried to touch a dispatcher under thread creation restriction, it tried to launch a new worker and then failed due to security restrictions. So after that coroutineScheduler reference remains null.

I'd say the expected behaviour is to fail to dispatch but no-op at close

qwwdfsad added a commit that referenced this issue Oct 31, 2018
@qwwdfsad qwwdfsad self-assigned this Oct 31, 2018
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

No branches or pull requests

2 participants