Skip to content

Update the code example for Dispatchers.Unconfined #3607

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

Merged
merged 1 commit into from
Feb 1, 2023

Conversation

ansman
Copy link
Contributor

@ansman ansman commented Jan 30, 2023

The previous example used withContext which is guaranteed to complete before the code after it runs. The updated example uses launch which I think was originally intended.

This fixes #3605 and KT-47032

The previous example used `withContext` which is guaranteed to complete before the code after it runs. The updated example uses `launch` which I think was originally intended.

This fixes Kotlin#3605 and [KT-47032](https://youtrack.jetbrains.com/issue/KT-47032/Incorrect-code-example-for-Dispatchers.Unconfined-in-kotlinx.coroutines-docs)
@qwwdfsad qwwdfsad requested a review from dkhalanskyjb February 1, 2023 14:14
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dkhalanskyjb dkhalanskyjb merged commit 52a3ae5 into Kotlin:master Feb 1, 2023
@ansman ansman deleted the patch-3 branch February 1, 2023 14:39
ansman added a commit to ansman/kotlinx.coroutines that referenced this pull request Feb 1, 2023
In my recent PR (Kotlin#3607) I changed the example for `Dispatchers.Unconfined` but the rest of the documentation still mentions two `withContext` which isn't correct any longer.
dkhalanskyjb pushed a commit that referenced this pull request Feb 1, 2023
In my recent PR (#3607) I changed the example for `Dispatchers.Unconfined` but the rest of the documentation still mentions two `withContext` which isn't correct any longer.
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

Successfully merging this pull request may close these issues.

Kdoc for Dispatchers.Unconfined is possibly incorrect
2 participants