Thread-4: Is going to do the first exercise. Mon Jul 22 13:40:50 CST 2019 Thread-4: Has done the first exercise. Mon Jul 22 13:40:50 CST 2019 Thread-3: Is going to do the first exercise. Mon Jul 22 13:40:50 CST 2019 Thread-0: Is going to do the first exercise. Mon Jul 22 13:40:50 CST 2019 Thread-2: Has done the first exercise. Mon Jul 22 13:40:52 CST 2019 Thread-0: Has done the first exercise. Mon Jul 22 13:40:55 CST 2019 Thread-1: Has done the first exercise. Mon Jul 22 13:40:56 CST 2019 Thread-3: Has done the first exercise. Mon Jul 22 13:40:57 CST 2019 Phaser: All the students has finished the first exercise. Phaser: It's turn for the second one. Thread-1: Is going to do the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-0: Is going to do the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-2: Is going to do the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-2: Has done the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-4: Is going to do the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-3: Is going to do the second exercise. Mon Jul 22 13:40:57 CST 2019 Thread-0: Has done the second exercise. Mon Jul 22 13:40:59 CST 2019 Thread-4: Has done the second exercise. Mon Jul 22 13:40:59 CST 2019 Thread-3: Has done the second exercise. Mon Jul 22 13:41:03 CST 2019 Thread-1: Has done the second exercise. Mon Jul 22 13:41:04 CST 2019 Phaser: All the students has finished the second exercise. Phaser: It's turn for the third one. Thread-3: Is going to do the third exercise. Mon Jul 22 13:41:04 CST 2019 Thread-3: Has finished the exam. Mon Jul 22 13:41:04 CST 2019 Thread-4: Is going to do the third exercise. Mon Jul 22 13:41:04 CST 2019 Thread-0: Is going to do the third exercise. Mon Jul 22 13:41:04 CST 2019 Thread-2: Is going to do the third exercise. Mon Jul 22 13:41:04 CST 2019 Thread-1: Is going to do the third exercise. Mon Jul 22 13:41:04 CST 2019 Thread-0: Has finished the exam. Mon Jul 22 13:41:06 CST 2019 Thread-4: Has finished the exam. Mon Jul 22 13:41:09 CST 2019 Thread-2: Has finished the exam. Mon Jul 22 13:41:09 CST 2019 Thread-1: Has finished the exam. Mon Jul 22 13:41:09 CST 2019 Phaser: All the students has finished the exam. Phaser: Thank you for your time. Main: The phaser has finished: true.
下面是添加了模拟学生不会做的情况的输出:
Thread-1: Has arrived to do the exam. Mon Jul 22 14:00:09 CST 2019 Thread-4: Has arrived to do the exam. Mon Jul 22 14:00:09 CST 2019 Thread-3: Has arrived to do the exam. Mon Jul 22 14:00:09 CST 2019 Thread-0: Has arrived to do the exam. Mon Jul 22 14:00:09 CST 2019 Thread-2: Has arrived to do the exam. Mon Jul 22 14:00:09 CST 2019 Phaser: The exam are going to start. The students are ready. Phaser: We have 5 students. Thread-2: Is going to do the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-2: Exit the exam Thread-4: Is going to do the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-4: Exit the exam Thread-0: Is going to do the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-0: Has done the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-3: Is going to do the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-1: Is going to do the first exercise. Mon Jul 22 14:00:09 CST 2019 Thread-1: Exit the exam Thread-3: Has done the first exercise. Mon Jul 22 14:00:14 CST 2019 Phaser: All the students has finished the first exercise. Phaser: It's turn for the second one. Thread-0: Is going to do the second exercise. Mon Jul 22 14:00:14 CST 2019 Thread-0: Exit the exam Thread-3: Is going to do the second exercise. Mon Jul 22 14:00:14 CST 2019 Thread-3: Has done the second exercise. Mon Jul 22 14:00:19 CST 2019 Phaser: All the students has finished the second exercise. Phaser: It's turn for the third one. Thread-3: Is going to do the third exercise. Mon Jul 22 14:00:19 CST 2019 Thread-3: Exit the exam Phaser: All the students has finished the exam. Phaser: Thank you for your time. Main: The phaser has finished: true.