Better approach to waiting while all actions are complete before sleeping. Efficient, yet the main loop remains running.