...

/

Coroutines Builders: The runBlocking Builder

Coroutines Builders: The runBlocking Builder

Delve further into the runBlocking builder, one of the three types of coroutine builders.

We'll cover the following...

The runBlocking builder

The general rule is that coroutines should never block threads, only suspend them. On the other hand, there are cases in which blocking is necessary. Like in the main function, we need to block the thread; otherwise, our program will end too early. For such cases, we might use ...