Intermediate Kotlin
Q49 / 100

What does withContext(Dispatchers.IO) do in a coroutine?

Correct! Well done.

Incorrect.

The correct answer is B) Switches the coroutine's dispatcher for a block without creating a new coroutine

B

Correct Answer

Switches the coroutine's dispatcher for a block without creating a new coroutine

Explanation

withContext suspends the current coroutine, switches to the specified dispatcher, executes the block, then resumes on the original dispatcher.

Progress
49/100