'Stops the worker processes immediately without completing
outstanding work. When the pool object is garbage collected
terminate() will be called immediately.'

def terminate(self):

    self.close()
    try:
        while 1:
            self._workq.get_nowait()
    except Queue.Empty:
        pass
    for thr in self._workers:
        self._workq.put(SENTINEL)
