-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Public experimental shutdown method on DefaultDispatcher #2652
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
Conversation
0358568
to
4420c79
Compare
* - On Kotlin/Native requests termination of the worker created by the [Default] dispatcher. | ||
*/ | ||
@ExperimentalCoroutinesApi | ||
public fun CoroutineDispatcher.shutdown() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signature seems to be not really usable because it has two receivers and also has effect only on the default dispatcher in K/N which is a bit weird.
I'd suggest sticking with Dispatchers.shutdownDefaultDispatcher
while we don't have a separate type for Dispatchers.Default
and cannot do Dispatchers.Default.shutdown()
.
f739cdb
to
28fb12c
Compare
d4ad99a
to
46f7abd
Compare
* Provides newSingleThreadedContext. * Provides Dispatchers.Main on iOS, Dispatchers.Default everywhere. * Coroutine references (Job), all kinds of channels and StateFlow are shareable across workers. * Each individual coroutine is confined to a single worker. * Update Dispatchers docs to account for native-mt changes. * Multithreaded support in select expression. * Fix ObjC autorelease object leaks with native-mt dispatchers (#2477) Additional fixes: * Fixed broadcast builder with different thread * Fixed adding a child to a frozen parent job Fixes #462 Fixes #470 Fixes #765 Fixes #1645 Fixes #1751 Fixes #1828 Fixes #1831 Fixes #1764 Fixes #2064 Fixes #2025 Fixes #2226 Fixes #2138 Fixes #2263 Fixes #2322 Fixes #2283 Fixes #2688
fd982ae
to
ce4a323
Compare
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
…in/kotlinx.coroutines into defalut-dispatcher-shutdown
8df9c27
to
48cf2cf
Compare
e0f92a6
to
386640c
Compare
Closing as won't fix |
Fixes #2491