execute

open suspend override fun <T> execute(block: suspend () -> T): T

Acquires a permit (or queues), executes block, then releases the permit.

Return

The result of block.

Parameters

block

The suspendable operation to run under the bulkhead limit.

Type Parameters

T

The return type of the block.

Throws

When no permit is available and the wait queue is full (or wait times out if configured).