SelectorManagerSupport

Base class for NIO selector managers

Inheritors

Properties

Link copied to clipboard
Link copied to clipboard

NIO selector provider

Functions

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.

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

Notifies the selector that selectable has been closed.

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