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.
abstract val isShutdown: Boolean
Check if the group has been shutdown. |
|
abstract val isTerminated: Boolean
Check if the group has terminated. |
abstract suspend fun awaitTermination(): Unit
Suspend until the group has terminated. |
|
abstract fun shutdown(): Unit
Shuts down the group. |
|
abstract fun shutdownNow(): Unit
Shuts down the group and closes all open channels in the group. |
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. |