Skip to content

Documentation improvement about async.await cancelling outer scope #787

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

Closed
Tolriq opened this issue Nov 2, 2018 · 1 comment
Closed
Labels
docs KDoc and API reference

Comments

@Tolriq
Copy link

Tolriq commented Nov 2, 2018

After a discussion on slack I discovered that fact (async.await cancelling outer scope) and could not find a proper explanation / really visible point in the current documentation.

https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/exception-handling.md#exception-handling

Explanations are visible in #763 but I do not think users will take time to read all the issues to find such things.

Since it's a relatively major point as most docs suggest to have a global coroutineContext for the activity or fragment or whatever, not knowing that can generate hard to find issues.

@rocketraman
Copy link
Contributor

rocketraman commented Nov 17, 2018

Related to this is supervisorScope... the section about supervision in the docs does not provide any examples of various recovery scenarios. For example, if I am doing parallel task decomposition via async inside a supervisorScope, how do I either let every job complete or alternatively cancel all children? Are their other recovery scenarios possible as well?

There is a good example of this here: https://stackoverflow.com/a/53222272/430128

qwwdfsad added a commit that referenced this issue May 28, 2019
Mention structured concurrency, but do not explain it there as the term should be easily googlable

Fixes #787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs KDoc and API reference
Projects
None yet
Development

No branches or pull requests

3 participants