Use a proper threading.Event for synchronization rather than a list