await

fun await(timeoutMsecs: Long = 0): T(source)

Blocks the current thread until the result is available or the timeout expires.

Return

The result of the operation.

Parameters

timeoutMsecs

Maximum time to wait in milliseconds. If 0, waits indefinitely.

Throws

if a timeout occurs or if an internal error happens.