[P-1] Producing value : +0 [P-1] Producing value : +1 [P-1] Producing value : +2 [P-1] Producing value : +3 [P-1] Producing value : +4 Queue is full, Producer[P-1] thread waiting for consumer to take something from queue. [C3] Consuming value : 0 [C3] Consuming value : 1 [C3] Consuming value : 2 [C3] Consuming value : 3 [C3] Consuming value : 4 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +0 [C1] Consuming value : 0 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +5 [P-1] Producing value : +6 [P-1] Producing value : +7 [P-1] Producing value : +8 [P-1] Producing value : +9 Queue is full, Producer[P-1] thread waiting for consumer to take something from queue. [C3] Consuming value : 5 [C3] Consuming value : 6 [C3] Consuming value : 7 [C3] Consuming value : 8 [C3] Consuming value : 9 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +1 [C1] Consuming value : 1 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +10 [P-1] Producing value : +11 [P-1] Producing value : +12 [P-1] Producing value : +13 [P-1] Producing value : +14 Queue is full, Producer[P-1] thread waiting for consumer to take something from queue. [C3] Consuming value : 10 [C3] Consuming value : 11 [C3] Consuming value : 12 [C3] Consuming value : 13 [C3] Consuming value : 14 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +2 [P-2] Producing value : +3 [P-2] Producing value : +4 [P-2] Producing value : +5 [P-2] Producing value : +6 Queue is full, Producer[P-2] thread waiting for consumer to take something from queue. [C1] Consuming value : 2 [C1] Consuming value : 3 [C1] Consuming value : 4 [C1] Consuming value : 5 [C1] Consuming value : 6 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +15 [C3] Consuming value : 15 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +7 [P-2] Producing value : +8 [P-2] Producing value : +9
[P-1] Producing value : +0 [C1] Consuming value : 0 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer [P-2] Producing value : +0 [C3] Consuming value : 0 Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +1 [C2] Consuming value : 1 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +1 [C1] Consuming value : 1 Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +2 [C3] Consuming value : 2 Queue is empty, Consumer[C2] thread is waiting for Producer [P-2] Producing value : +2 [C2] Consuming value : 2 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer [P-1] Producing value : +3 [C1] Consuming value : 3 Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-2] Producing value : +3 [C2] Consuming value : 3 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer [P-1] Producing value : +4 [C1] Consuming value : 4 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +4 [C3] Consuming value : 4 Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +5 [C2] Consuming value : 5 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C2] thread is waiting for Producer [P-1] Producing value : +5 [C1] Consuming value : 5 Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-2] Producing value : +6 [C2] Consuming value : 6 Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +6 [C3] Consuming value : 6 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-2] Producing value : +7 [C3] Consuming value : 7 Queue is empty, Consumer[C1] thread is waiting for Producer [P-1] Producing value : +7 [C1] Consuming value : 7 Queue is empty, Consumer[C2] thread is waiting for Producer [P-2] Producing value : +8 [C2] Consuming value : 8 [P-1] Producing value : +8 [C1] Consuming value : 8 [P-2] Producing value : +9 [C3] Consuming value : 9 [P-2] Producing value : +10 [C2] Consuming value : 10 [P-1] Producing value : +9 [P-1] Producing value : +10 [C1] Consuming value : 9 [P-2] Producing value : +11 [C3] Consuming value : 10 [C2] Consuming value : 11 [P-2] Producing value : +12 [C1] Consuming value : 12 [P-1] Producing value : +11 [C3] Consuming value : 11 [P-2] Producing value : +13 [C2] Consuming value : 13 Queue is empty, Consumer[C2] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +12 [C2] Consuming value : 12 Queue is empty, Consumer[C3] thread is waiting for Producer [P-1] Producing value : +13 [C3] Consuming value : 13 Queue is empty, Consumer[C1] thread is waiting for Producer Queue is empty, Consumer[C3] thread is waiting for Producer [P-2] Producing value : +14 [C1] Consuming value : 14 Queue is empty, Consumer[C3] thread is waiting for Producer Queue is empty, Consumer[C1] thread is waiting for Producer [P-1] Producing value : +14 [C3] Consuming value : 14 Queue is empty, Consumer[C1] thread is waiting for Producer [P-1] Producing value : +15 [C1] Consuming value : 15 [P-2] Producing value : +15 [P-1] Producing value : +16 [C3] Consuming value : 15 [P-2] Producing value : +16