Couldn't this line just be `if callback_queue.empty():` ?