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

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 (source)

Create a co-routine channel group.

Parameters

nSelectors - The number of selectors that should be active in the group. Defaults to one per available system processor.

executor - The thread pool for running selectors. Defaults to a fixed size thread pool, with one thread per selector.

loggerProvider - A provider for logger instances.

selectTimeout - The maximum time the selection operation will wait before checking for closed channels.

idleTimeout - The minimum idle time before the selection loop of a selector exits.

Return
A co-routine channel group.