public class ThreadPoolDispatcherKt
| Modifier and Type | Method and Description |
|---|---|
static kotlin.coroutines.experimental.CoroutineContext |
newFixedThreadPoolContext(int nThreads,
java.lang.String name,
Job parent)
Creates new coroutine execution context with the fixed-size thread-pool and built-in yield and delay support.
All continuations are dispatched immediately when invoked inside the threads of this context.
Resources of this pool (its threads) are reclaimed when job of this context is cancelled.
The specified name defines the names of the threads.
An optional parent job may be specified upon creation.
|
static kotlin.coroutines.experimental.CoroutineContext |
newSingleThreadContext(java.lang.String name,
Job parent)
Creates new coroutine execution context with the a single thread and built-in yield and delay support.
All continuations are dispatched immediately when invoked inside the thread of this context.
Resources of this pool (its thread) are reclaimed when job of this context is cancelled.
The specified name defines the name of the new thread.
An optional parent job may be specified upon creation.
|
public static kotlin.coroutines.experimental.CoroutineContext newSingleThreadContext(java.lang.String name,
Job parent)
Creates new coroutine execution context with the a single thread and built-in yield and delay support. All continuations are dispatched immediately when invoked inside the thread of this context. Resources of this pool (its thread) are reclaimed when job of this context is cancelled. The specified name defines the name of the new thread. An optional parent job may be specified upon creation.
public static kotlin.coroutines.experimental.CoroutineContext newFixedThreadPoolContext(int nThreads,
java.lang.String name,
Job parent)
Creates new coroutine execution context with the fixed-size thread-pool and built-in yield and delay support. All continuations are dispatched immediately when invoked inside the threads of this context. Resources of this pool (its threads) are reclaimed when job of this context is cancelled. The specified name defines the names of the threads. An optional parent job may be specified upon creation.