newCoroutineContext
Creates a context for a new coroutine.
This function is used by coroutine builders to create a new coroutine context.
It installs Dispatchers.Default when no other dispatcher or ContinuationInterceptor is specified.
On the JVM, if the debug mode is enabled, it assigns a unique identifier to every coroutine for tracking it.
On the JVM, copyable thread-local elements from CoroutineScope.coroutineContext and context are copied and combined as needed.
The elements of context and CoroutineScope.coroutineContext other than copyable thread-context ones are combined as is, with the elements from context overriding the elements from CoroutineScope.coroutineContext in case of equal keys.
See the documentation of this function's JVM implementation for platform-specific details.
Creates a context for a new coroutine.
This function is used by coroutine builders to create a new coroutine context.
It installs Dispatchers.Default when no other dispatcher or ContinuationInterceptor is specified.
On the JVM, if the debug mode is enabled, it assigns a unique identifier to every coroutine for tracking it.
On the JVM, copyable thread-local elements from CoroutineScope.coroutineContext and context are copied and combined as needed.
The elements of context and CoroutineScope.coroutineContext other than copyable thread-context ones are combined as is, with the elements from context overriding the elements from CoroutineScope.coroutineContext in case of equal keys.
See the documentation of this function's JVM implementation for platform-specific details.
Creates a context for a new coroutine.
See the documentation of this function's common-code implementation for a general overview. Here, the JVM-specific details are described.
If the debug mode is enabled, newCoroutineContext assigns a unique identifier to every coroutine for tracking it. The ID is visible in toString of the coroutine context or its job and in the thread name, as well as in the dumps produced by the
kotlinx-coroutines-debugmodule.CopyableThreadContextElement values are combined. If both the parent and context have the same CopyableThreadContextElement (when their key is equal), the values are merged. If only the parent or only the context has the CopyableThreadContextElement, the value is copied.
Creates a context for a new coroutine.
This function is used by coroutine builders to create a new coroutine context.
It installs Dispatchers.Default when no other dispatcher or ContinuationInterceptor is specified.
On the JVM, if the debug mode is enabled, it assigns a unique identifier to every coroutine for tracking it.
On the JVM, copyable thread-local elements from CoroutineScope.coroutineContext and context are copied and combined as needed.
The elements of context and CoroutineScope.coroutineContext other than copyable thread-context ones are combined as is, with the elements from context overriding the elements from CoroutineScope.coroutineContext in case of equal keys.
See the documentation of this function's JVM implementation for platform-specific details.