net-coroutines / org.apache.tuweni.net.coroutines / CoroutineSelector / cancelSelections

cancelSelections

abstract suspend fun cancelSelections(channel: SelectableChannel, cause: Throwable? = null): Boolean (source)

Cancel any suspended calls to select for the specified channel.

Parameters

channel - The channel.

cause - An optional cause for the cancellation.

Exceptions

ClosedSelectorException - If the co-routine selector has been closed.

Return
true if any suspensions were cancelled.