calling register thread with id = 10 calling request cpu with id = 10 inside operator(), with id = 10 attempting to lock mutex with address = 0x50c050 calling register thread with id = 9 calling request cpu with id = 9 attempting to lock thread with id = 9 mutex address = 0x50c0a0 inside operator(), with id = 9 attempting to lock mutex with address = 0x50c0a0 calling register thread with id = 8 calling request cpu with id = 8 attempting to lock thread with id = 8 mutex address = 0x50c2e0 inside operator(), with id = 8 attempting to lock mutex with address = 0x50c2e0 calling register thread with id = 7 calling request cpu with id = 7 attempting to lock thread with id = 7 mutex address = 0x50c560 inside operator(), with id = 7 attempting to lock mutex with address = 0x50c560 calling register thread with id = 6 calling request cpu with id = 6 attempting to lock thread with id = 6 mutex address = 0x50c800 inside operator(), with id = 6 attempting to lock mutex with address = 0x50c800 calling register thread with id = 5 calling request cpu with id = 5 attempting to lock thread with id = 5 mutex address = 0x50caf0 inside operator(), with id = 5 attempting to lock mutex with address = 0x50caf0 calling register thread with id = 4 calling request cpu with id = 4 attempting to lock thread with id = 4 mutex address = 0x50cd70 inside operator(), with id = 4 attempting to lock mutex with address = 0x50cd70 calling register thread with id = 3 calling request cpu with id = 3 attempting to lock thread with id = 3 mutex address = 0x50ca80 inside operator(), with id = 3 attempting to lock mutex with address = 0x50ca80 calling register thread with id = 2 calling request cpu with id = 2 attempting to lock thread with id = 2 mutex address = 0x50d2d0 inside operator(), with id = 2 attempting to lock mutex with address = 0x50d2d0 calling register thread with id = 1 calling request cpu with id = 1 attempting to lock thread with id = 1 mutex address = 0x50d550 inside operator(), with id = 1 attempting to lock mutex with address = 0x50d550 calling join all 10: 0 10: 1 10: 2 10: 3 10: 4 10: 5 10: 6 10: 7 10: 8 10: 9 calling release_cpu id = 10 _queue_executing_threads.top()->_id = 10 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 9 returning 0 in release_cpu 9: 0 9: 1 9: 2 9: 3 9: 4 9: 5 9: 6 9: 7 9: 8 9: 9 calling release_cpu id = 9 _queue_executing_threads.top()->_id = 9 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 8 returning 0 in release_cpu 8: 0 8: 1 8: 2 8: 3 8: 4 8: 5 8: 6 8: 7 8: 8 8: 9 calling release_cpu id = 8 _queue_executing_threads.top()->_id = 8 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 7 returning 0 in release_cpu 7: 0 7: 1 7: 2 7: 3 7: 4 7: 5 7: 6 7: 7 7: 8 7: 9 calling release_cpu id = 7 _queue_executing_threads.top()->_id = 7 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 6 returning 0 in release_cpu 6: 0 6: 1 6: 2 6: 3 6: 4 6: 5 6: 6 6: 7 6: 8 6: 9 calling release_cpu id = 6 _queue_executing_threads.top()->_id = 6 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 5 returning 0 in release_cpu 5: 0 5: 1 5: 2 5: 3 5: 4 5: 5 5: 6 5: 7 5: 8 5: 9 calling release_cpu id = 5 _queue_executing_threads.top()->_id = 5 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 4 returning 0 in release_cpu 4: 0 4: 1 4: 2 4: 3 4: 4 4: 5 4: 6 4: 7 4: 8 4: 9 calling release_cpu id = 4 _queue_executing_threads.top()->_id = 4 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 3 returning 0 in release_cpu 3: 0 3: 1 3: 2 3: 3 3: 4 3: 5 3: 6 3: 7 3: 8 3: 9 calling release_cpu id = 3 _queue_executing_threads.top()->_id = 3 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 2 returning 0 in release_cpu 2: 0 2: 1 2: 2 2: 3 2: 4 2: 5 2: 6 2: 7 2: 8 2: 9 calling release_cpu id = 2 _queue_executing_threads.top()->_id = 2 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = false calling _queue_executing_threads.push calling _queue_waiting_threads.pop() for id = 1 returning 0 in release_cpu 1: 0 1: 1 1: 2 1: 3 1: 4 1: 5 1: 6 1: 7 1: 8 1: 9 calling release_cpu id = 1 _queue_executing_threads.top()->_id = 1 _queue_executing_threads.top()->_is_executing = false calling _queue_executing_threads.pop() _queue_waiting_threads.empty() = true returning 0 in release_cpu Done!