This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5443783-kotlin-coroutines-in-depth/lessons/2
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5443783-kotlin-coroutines-in-depth/lessons/2
Could you please tell me why you use while and donโt use runBlocking ?
Hey @yvgen!
Iโve used a while loop instead of runBlocking to imitate computing and as such hold the program. I wanted to avoid runBlocking where possible, because itโs often misused.
In most real-life examples you wonโt be using runBlocking, but you might have a blocking call.
Does this make sense? :]
Got it, thank you for the answer.
1 Like