Investigate possible shortcuts for coroutineContext.job.invokeOnCompletion { if (it != null) ... }
#3259
Labels
coroutineContext.job.invokeOnCompletion { if (it != null) ... }
#3259
The pattern itself is useful for any closeable resources that face non-atomic cancellation (#1191) as the only reliable way to close it.
Apart from that, the pattern itself is very clunky, but seems to be quite frequent: [1], [2].
We should investigate whether we can provide more convenient extensions on top of
CoroutineContext
andCoroutineScope
The text was updated successfully, but these errors were encountered: