tryAcquire

suspend fun tryAcquire(permits: Int = 1): Boolean(source)

Tries to acquire the specified number of permits.

Return

true if permits were acquired, false otherwise

Parameters

permits

Number of permits to acquire