complete

abstract fun complete(): T(source)

Blocks until the event waiter receives an event of the specified type, and all preconditions have passed.

Note: I recommend you use submit with CompletableFuture.whenComplete

Return

The event specified in EventWaiter.of

Throws

If you canceled the event waiter

If an exception occurred in the event waiter or in a callback

If this thread gets interrupted while waiting for the event