-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Consider deprecation cycle for CoroutineDispatcher.invoke
#4199
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
For context, it was originally added in #428 as an experiment. As far as I know, it is very rarely used (if at all) in the ecosystem. |
Very few usages found: I personally find this to be non-idiomatic modern Kotlin. |
We can try and proceed with it in RC2 along with other deprecations |
2024-08-01-135455_1613x586_escrotum.webm |
Finding some good IntelliJ bugs/feature requests at least! |
CoroutineDispatcher.invoke
, a function used as such:is a shorter version of
withContext
that only works with dispatchers.Does this function need to exist? It seems to predate structured concurrency and is so terse that it offers no indication as to its underlying behavior. Does it launch a new coroutine? Does it move the current coroutine? Does the supplied block honor structured concurrency?
I personally have a hard time finding a reason for this function to continue to exist.
The text was updated successfully, but these errors were encountered: