public class ThreadPoolDispatcherKt
| Modifier and Type | Method and Description |
|---|---|
static ThreadPoolDispatcher |
newFixedThreadPoolContext(int nThreads,
java.lang.String name)
Creates new coroutine execution context with the fixed-size thread-pool and built-in yield and delay support.
NOTE: The resulting
class ThreadPoolDispatcher owns native resources (its threads).Resources are reclaimed by ThreadPoolDispatcher.close. |
static ThreadPoolDispatcher |
newSingleThreadContext(java.lang.String name)
Creates new coroutine execution context with the a single thread and built-in yield and delay support.
NOTE: The resulting
class ThreadPoolDispatcher owns native resources (its thread).Resources are reclaimed by ThreadPoolDispatcher.close. |
public static ThreadPoolDispatcher newSingleThreadContext(java.lang.String name)
Creates new coroutine execution context with the a single thread and built-in yield and delay support.
NOTE: The resulting class ThreadPoolDispatcher owns native resources (its thread).Resources are reclaimed by ThreadPoolDispatcher.close.
name - the base name of the created thread.class ThreadPoolDispatcher,
ThreadPoolDispatcher.closepublic static ThreadPoolDispatcher newFixedThreadPoolContext(int nThreads, java.lang.String name)
Creates new coroutine execution context with the fixed-size thread-pool and built-in yield and delay support.
NOTE: The resulting class ThreadPoolDispatcher owns native resources (its threads).Resources are reclaimed by ThreadPoolDispatcher.close.
nThreads - the number of threads.name - the base name of the created threads.class ThreadPoolDispatcher,
ThreadPoolDispatcher.close