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

Clarify Dispatchers.IO's implementation note #2780

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Clarify Dispatchers.IO's implementation note #2780

merged 1 commit into from
Jun 22, 2021

Conversation

joffrey-bion
Copy link
Contributor

This implementation note mentions that withContext(IO) does not lead to a
context switch, which may be misunderstood as a general statement, while
it in fact only applies to switches between Default and IO dispatchers.

This is one example of misunderstanding:
https://stackoverflow.com/questions/68069529/is-kotlinx-coroutines-withcontext-safe-to-use-with-spring-webflux

This implementation note mentions that withContext(IO) does not lead to a
context switch, which may be misunderstood as a general statement, while
it in fact only applies to switches between Default and IO dispatchers.

This is one example of misunderstanding:
https://stackoverflow.com/questions/68069529/is-kotlinx-coroutines-withcontext-safe-to-use-with-spring-webflux
Copy link
Collaborator

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

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

Nice addition, thanks!

@qwwdfsad qwwdfsad merged commit 3d62f64 into Kotlin:develop Jun 22, 2021
pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
This implementation note mentions that withContext(IO) does not lead to a
context switch, which may be misunderstood as a general statement, while
it in fact only applies to switches between Default and IO dispatchers.

This is one example of misunderstanding:
https://stackoverflow.com/questions/68069529/is-kotlinx-coroutines-withcontext-safe-to-use-with-spring-webflux
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.

2 participants