await

fun await(timeout: Duration, msg: String)

Waits repeatedly for the latch to reach zero, logging msg at INFO level each time the timeout expires without the latch being satisfied.

Parameters

timeout

the duration of each individual wait attempt.

msg

the message to log on each timeout.

Throws

if the current thread is interrupted while waiting.


fun await(timeout: Duration, msg: () -> Any?)

Waits repeatedly for the latch to reach zero, logging the result of msg at INFO level each time the timeout expires without the latch being satisfied.

Parameters

timeout

the duration of each individual wait attempt.

msg

a lambda producing the message to log on each timeout.

Throws

if the current thread is interrupted while waiting.