https://kotlinlang.org logo
#coroutines
Title
# coroutines
a

Adam Powell

07/28/2019, 10:53 PM
are there any plans to expose the
ChildCancelledException
mechanism used by
scopedFlow
and `channelFlow`/`callbackFlow` before the latter two lose their
@ExperimentalCoroutinesApi
status, or otherwise make external cancellation of a `launch`ed child in those scopes behave that way by default?
Looks like this is already being investigated in https://github.com/Kotlin/kotlinx.coroutines/issues/1334 👍
e

elizarov

08/04/2019, 8:30 AM
Changing default is tough (backwards compatibility), but we are thinking about a more general solution than
coroutineScope
,
supervisorScope
, and (internal)
flowScope
that would support user-specified exception-handling strategy, allowing to specify which exceptions shall be propagated. I’ve made a short writeup here: https://github.com/Kotlin/kotlinx.coroutines/issues/1406
👍 2
10 Views