altavir
04/28/2019, 6:47 AMval deferred = coroutineScope {
async(start = CoroutineStart.LAZY) { println("async") }
}
deferred.await()
causes a infinite block. I understand that it is caused by interference of lazy deferred with structured concurrency, but it significantly reduces application for lazy deferred. Is it intended to be this way?octylFractal
04/28/2019, 6:49 AMawait
is called
- therefore, it blocksaltavir
04/28/2019, 6:53 AMoctylFractal
04/28/2019, 6:55 AMleak it outside the scopeisn't this antithetical to structured concurrency? if you want to "leak" something, you can't tie it as a child -- you must start it using something like
GlobalScope
, to make it owned by something else, so it may persist outside of the scope.altavir
04/28/2019, 7:01 AMCoroutineScope.start
and deprecate CoroutineStart.LAZY
.Dominaezzz
04/28/2019, 8:48 AMGlobalScope
.louiscad
04/28/2019, 10:31 AMoctylFractal
04/28/2019, 6:07 PM