Coroutine for heavy operation

Coroutines are not magic. It’s just a way of slicing up some code. Adding waits will simply defer execution of the code.

Coroutines in a nutshell:

Splitting up larger tasks in coroutines:

Coroutines are NOT always an appropriate solution: know when to use them!

1 Like