SelectorManager

expect interface SelectorManager : CoroutineScope, Closeable

SelectorManager interface allows Selectable wait for SelectInterest.

actual interface SelectorManager : CoroutineScope, Closeable

Selector manager is a service that manages NIO selectors and selection threads

actual interface SelectorManager : CoroutineScope, Closeable

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Functions

Link copied to clipboard
expect abstract fun close()
abstract override fun close()
abstract fun close()
Link copied to clipboard
expect abstract fun notifyClosed(selectable: Selectable)

Notifies the selector that selectable has been closed.

actual abstract fun notifyClosed(selectable: Selectable)

Notifies the selector that selectable has been closed.

actual abstract fun notifyClosed(selectable: Selectable)

Notifies the selector that selectable has been closed.

Link copied to clipboard
expect abstract suspend fun select(selectable: Selectable, interest: SelectInterest)

Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created.

actual abstract suspend fun select(selectable: Selectable, interest: SelectInterest)

Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created.

actual abstract suspend fun select(selectable: Selectable, interest: SelectInterest)

Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created.

Properties

coroutineContext
Link copied to clipboard
Link copied to clipboard

NIO selector provider

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
inline fun <C : Closeable, R> SelectorManager.buildOrClose(create: SelectorProvider.() -> C, setup: C.() -> R): R

Creates a NIO entity via create and calls setup on it. If any exception happens then the entity will be closed and an exception will be propagated.