aerb
08/05/2019, 5:29 PMtry
/ catch
oriented way of accessing the result of async
? Thinking of something similar to Result
Marko Mitic
08/05/2019, 5:30 PMtryAwait
?aerb
08/05/2019, 5:31 PMMarko Mitic
08/05/2019, 5:32 PMaerb
08/05/2019, 5:32 PMMarko Mitic
08/05/2019, 5:32 PMaerb
08/05/2019, 5:33 PMZach Klippenstein (he/him) [MOD]
08/05/2019, 6:24 PMdeferred.runCatching { await() }
is probably more readable anyway, since it’s super obvious what it does and doesn’t require learning more API on Deferred
.louiscad
08/05/2019, 7:09 PMasync
will still cancel its scope though, unles its a supervisor one, or has no job (like GlobalScope)Marko Mitic
08/05/2019, 7:11 PMlouiscad
08/05/2019, 7:19 PMcoroutineScope { … }
, or you catch it inside the async
block. If you don't do parallelization, you most probably don't need async
at all though, only suspending function + try catch.