consumer thread was running before checking to see whether or not the queue was empty