Replace old mutex-based pause with a simple loop
Use a condition variable instead of a loop for pausing
Merge branch 'better_pause'