sdeleuze
02/18/2019, 1:38 PMgmariotti
02/19/2019, 10:44 AMGlobalScope.mono
, for example in the WebClient? Isn’t there the risk that, if one of the mono
fails, the GlobalScope
will cancel all the others?sdeleuze
02/20/2019, 9:35 AMGlobalScope
. Could you elaborate? Also see https://kotlinlang.slack.com/archives/C1CFAFJSK/p1548857935692300?thread_ts=1548856043.691400&cid=C1CFAFJSK.sdeleuze
02/20/2019, 9:37 AMUnconfined
dispatcher to be more efficient.sdeleuze
02/20/2019, 9:38 AMsdeleuze
02/20/2019, 9:39 AMsdeleuze
02/20/2019, 9:39 AMsdeleuze
02/20/2019, 9:40 AMgmariotti
02/20/2019, 9:42 AMsdeleuze
02/20/2019, 10:22 AMelizarov
02/20/2019, 1:57 PMGlobalScope
-launched coroutines will not be cancelled when one of them fails. They are not even referenced by the global scope. However, you indeed to have tests on the cancelation/failure scenarios to make sure nothing leaks and all the open resources are timely closed.sdeleuze
02/20/2019, 2:57 PMCancellationException
. Currently if I throw a CancellationException
from a suspendable request handler I get 500 error and the exception logged. That seems consistent with GlobalScope.mono
documentation which mention "Failure with exception or unsubscribe | `error`".
Is it what Kotlin users should expect or should CancellationException
be handled as a special case on Spring side ?elizarov
02/20/2019, 5:48 PMsdeleuze
02/20/2019, 5:49 PM