Switch to using threading.Event instead of a Queue.