UNDISPATCHED

UNDISPATCHED (source)

Immediately executes the coroutine until its first suspension point in the current thread as if the coroutine was started using Dispatchers.Unconfined. However, when the coroutine is resumed from suspension it is dispatched according to the CoroutineDispatcher in its context.

This is similar to ATOMIC in the sense that coroutine starts executing even if it was already cancelled, but the difference is that it starts executing in the same thread.

Cancellability of coroutine at suspension points depends on the particular implementation details of suspending functions as in DEFAULT.

Note: This is an experimental api. Execution semantics of coroutines may change in the future when this mode is used.