withPassivePermit

suspend fun <T> withPassivePermit(block: suspend () -> T): T

Executes block while holding a permit from passiveSemaphore, capping concurrent passive collection.

Return

The block's result.

Parameters

block

Suspending work to run under the concurrency limit.