await Event
suspend fun <T> ReceiveChannel<T>.awaitEvent(name: String? = null): Event<T>
Content copied to clipboard
Assert that an event was received and return it. This function will suspend if no events have been received.
This function will always return a terminal event on a closed ReceiveChannel.