Pause loop until a task is complete

while (!first_input) {
   read_first_input();
}

while (!second_input) {
   read_second_input();
}