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.

if timeout is shorter than 1 ms.


fun await(timeout: Duration, msg: String)

The verbose await for Java callers: the overloads taking a Kotlin Duration are compiled under a mangled name that Java cannot call.

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.

if timeout is shorter than 1 ms.


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

The verbose await with a message lambda, for Java callers; see the java.time.Duration await taking a String.

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.

if timeout is shorter than 1 ms.


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.

if timeout is shorter than 1 ms.