net-coroutines / org.apache.tuweni.net.coroutines / CoroutineChannelGroup

CoroutineChannelGroup

sealed class CoroutineChannelGroup (source)

A grouping of co-routine channels for the purpose of resource sharing.

A co-routine channel group encapsulates the mechanics required to handle completion of suspended I/O operations initiated on channels bound to the group.

Properties

isShutdown

abstract val isShutdown: Boolean

Check if the group has been shutdown.

isTerminated

abstract val isTerminated: Boolean

Check if the group has terminated.

Functions

awaitTermination

abstract suspend fun awaitTermination(): Unit

Suspend until the group has terminated.

shutdown

abstract fun shutdown(): Unit

Shuts down the group.

shutdownNow

abstract fun shutdownNow(): Unit

Shuts down the group and closes all open channels in the group.

Companion Object Functions

open

fun open(nSelectors: Int = Runtime.getRuntime().availableProcessors(), executor: Executor = Executors.newFixedThreadPool(nSelectors, CoroutineSelector.DEFAULT_THREAD_FACTORY), loggerProvider: LoggerProvider = LoggerProvider.nullProvider(), selectTimeout: Long = 1000, idleTimeout: Long = 10000): CoroutineChannelGroup

Create a co-routine channel group.