yield() does two things:
Since it is a suspend function, it signals to the coroutines system that it is safe to switch to another coroutine from this dispatcher, if there is one around that is ready to run
It throws CancellationException if the job was canceled