minisu02/15/2019, 8:53 AM
. How can I achieve something similar with coroutines?
Seems to work, but I'm not sure if it's guaranteed to work.
coroutineCounter -= 1 // a @Volatile field yield() assert(coroutineCounter == 0)
elizarov02/15/2019, 12:31 PM
minisu02/15/2019, 1:21 PM
, but didn't realize that you have to use a suspending function. The result was that he thought things run in parallel, even though it wasn't.
elizarov02/15/2019, 1:57 PM
minisu02/15/2019, 2:03 PM