I tracked the problem to `dequeue` method. `self.lock.wait` lasts forever.
I tracked the problem to
dequeuemethod.self.lock.waitlasts forever.