Use queue.Queue as exception queue.
Refactor.
Refactor.
Refactor.
Refactor.
Refactor.