SelectorManager

expect interface SelectorManager : CoroutineScope

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

Types

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

Functions

Link copied to clipboard
abstract override 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

Link copied to clipboard
abstract val coroutineContext: CoroutineContext
Link copied to clipboard
abstract val coroutineContext: CoroutineContext
Link copied to clipboard
abstract val provider: SelectorProvider

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.