pub fn wait_for_turn(&self, my_turn: usize) {
        let mut turn = self.current_turn.lock().unwrap();
        while *turn != my_turn {
            turn = self.cv.wait(turn).unwrap();
        }
    }
Waits for the current turn to be equal to the given turn.
crates/core/machine/src/utils/concurrency.rs