afterPrevious
Ensure that the block will only be executed after all previous work has completed.
When several coroutines call afterPrevious at the same time, they will queue up in the order that they call afterPrevious. Then, one coroutine will enter the block at a time.
Parameters
block
the code to run after previous work is complete.