runBlocking() is another coroutine builder. As the name suggests, it is a
blocking call. It takes a code block and executes it, only continuing once
that code block completes.
This may sound silly.
runBlocking() has one key feature that makes it important: it
executes the code block as a coroutine, so that code block can call
runBlocking() is used in cases where you need to use
suspend functions from code that otherwise is not in position to use
coroutines, such as some types of tests.
runBlocking() only works on Kotlin/JVM and Kotlin/Native. If
you attempt to run this code snippet here in the Klassbook, it will fail
with a compile error.