Semaphore

fun Semaphore(permits: Int, acquiredPermits: Int = 0): Semaphore

Creates new Semaphore instance.

Parameters

permits

the number of permits available in this semaphore.

acquiredPermits

the number of already acquired permits, should be between 0 and permits (inclusively).

Sources

common source
Link copied to clipboard