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
YieldKt.yield and DelayKt.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 a new coroutine execution context using a single thread with built-in
YieldKt.yield and DelayKt.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 a new coroutine execution context using a single thread with built-in YieldKt.yield and DelayKt.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.YieldKt.yield,
DelayKt.delay,
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 YieldKt.yield and DelayKt.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.YieldKt.yield,
DelayKt.delay,
class ThreadPoolDispatcher,
ThreadPoolDispatcher.close