To see the exception of queue.Empty and set timeout to queue wait.