-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify that using
runBlocking
in suspend
functions is allowed
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.
- Loading branch information
1 parent
d0dabb9
commit fdc0818
Showing
3 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters