def test_exception_in_worker_process(self):
        """ Test exception handler in process pool """

        # NOTE: The process pool has a problem that if the workers are throwing exceptions, their
        # zmq sockets will be closed and there is some race condition that can cause the ventilate
        # to raise an exception. Only ventilating a single time guarantees that it will be properly
        # sent to a worker before it has exited due to an exception
        pool = ProcessPool(2)
        self._test_exception_in_worker_impl(pool, 1)
        pool.stop()
        pool.join()
 Test exception handler in process pool 
petastorm/workers_pool/tests/test_workers_pool.py