def __call__(self):
        "Yield results obtained from the generator."
        self.queue = queue = Queue.Queue(self.queueSize)
        self.stopRequested = 0
        self.start() # run() will stuff the queue in a separate Thread 
        keepGoing, item = queue.get()
        while keepGoing:
            yield item
            keepGoing, item = queue.get()
        # if keepGoing is false, item is exc_info() result
        self.exc_info = item # stash it for the curious
        type, value, traceback = item
        if isinstance(type, StopIteration):
            return
        else:
            raise type, value, traceback
Yield results obtained from the generator.
recipes/Python/196890_Spawned_Generators/recipe-196890.py