executeOperation

suspend fun <R> executeOperation(block: Supplier<R>): R(source)

Executes the given operation decorated by this circuit breaker and returns its result, while handling any possible failure and emitting the necessary events.

Throws

if the circuit breaker is in the Open state or in the HalfOpen state and the permitted number of calls in the HalfOpen state has been exceeded.

if the coroutine is cancelled while waiting for the operation to be allowed.