UNDISPATCHED

Immediately executes the coroutine until its first suspension point in the current thread similarly to the coroutine being 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.

Unconfined event loop

Unlike Dispatchers.Unconfined and MainCoroutineDispatcher.immediate, nested undispatched coroutines do not form an event loop that otherwise prevents potential stack overflow in case of unlimited nesting.