sealed class CoroutineSelector
(source)
A selector for co-routine based channel IO.
Author
Chris Leishman - https://cleishm.github.io/
abstract suspend fun cancelSelections(channel: SelectableChannel, cause: Throwable? = null): Boolean
Cancel any suspended calls to select for the specified channel. |
|
abstract fun close(): Unit
Close the co-routine selector. |
|
abstract suspend fun closeNow(): Unit
Close the co-routine selector and wait for all suspensions to be cancelled. |
|
abstract fun isOpen(): Boolean
Indicates whether the selector is open or not. |
|
abstract suspend fun select(channel: SelectableChannel, ops: Int): Unit
Wait for a channel to become ready for any of the specified operations. |
|
abstract fun wakeup(): Unit
Force the selection loop, if running, to wake up and process any closed channels. |
fun open(executor: Executor = Executors.newSingleThreadExecutor(DEFAULT_THREAD_FACTORY), loggerProvider: LoggerProvider = LoggerProvider.nullProvider(), selectTimeout: Long = 1000, idleTimeout: Long = 10000): CoroutineSelector
Open a co-routine selector. |