CyclicBarrier

constructor(capacity: Int, barrierAction: () -> Unit = {})

Parameters

capacity

The number of coroutines that must await until the barrier cycles and all are released.

barrierAction

An optional runnable that will be executed when the barrier is cycled, but before releasing.