How to detect deadlocks when both threads call .get on their empty queues