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

Small documentation fixes #4042

Merged
merged 6 commits into from
Feb 15, 2024
Merged

Small documentation fixes #4042

merged 6 commits into from
Feb 15, 2024

Conversation

dkhalanskyjb
Copy link
Collaborator

No description provided.

@dkhalanskyjb dkhalanskyjb force-pushed the dk-doc-improvements branch 2 times, most recently from 794a782 to d190857 Compare February 14, 2024 13:03
Copy link
Member

@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.

👍

A user raised a concern that the internal coroutines machinery may
break if `runBlocking` is used somewhere deeply in the call stack.
Calling `runBlocking` from a `suspend` functions can lead to
deadlocks naturally due to blocking the thread, or to surprising
event ordering, but nothing is expected to break.

This commit clarifies the exact danger of calling `runBlocking`
from `suspend` functions.
Fixes two issues:
* It is surprising for some users that the same exception can be
  thrown several times. Clarified this point explicitly.
* Due to #3658, `await` can throw `CancellationException` in
  several cases: when the `await` call is cancelled, or when the
  `Deferred` is cancelled. This is clarified with an example of
  how to handle this.

Fixes #3937
Emphasize the fact that the function fails to resume *even if it
already completed* but wasn't dispatched yet. Before the change,
when translating the documentation to Chinese, there could be a
confusion as to what "it will not resume successfully" means.

Fixes #3888
Seems like a lot of the information was outdated.

Fixes #3725
@dkhalanskyjb dkhalanskyjb merged commit c5a579e into develop Feb 15, 2024
@dkhalanskyjb dkhalanskyjb deleted the dk-doc-improvements branch February 15, 2024 09:32
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.

3 participants