minisu
02/15/2019, 8:53 AMCyclicBarrier
. How can I achieve something similar with coroutines?coroutineCounter -= 1 // a @Volatile field
yield()
assert(coroutineCounter == 0)
Seems to work, but I'm not sure if it's guaranteed to work.elizarov
02/15/2019, 12:31 PMminisu
02/15/2019, 1:21 PMrunBlocking
and async
, 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.elizarov
02/15/2019, 1:57 PMminisu
02/15/2019, 2:03 PM