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

Documentation improvement about async.await cancelling outer scope #787

Closed
Tolriq opened this issue Nov 2, 2018 · 1 comment

Comments

@Tolriq
Copy link

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

This comment has been minimized.

Copy link
Contributor

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

Add paragraph about parent cancellation to async.
Mention structured concurrency, but do not explain it there as the term should be easily googlable

Fixes #787

@qwwdfsad qwwdfsad closed this in c81dc91 Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.