def __init__(self, collector = None, callback = None):
        """
        \param collector when not None, the notify_ready() method of
        the collector will be called when the result from the Job is
        ready
        \param callback when not None, function to call when the
        result becomes available (this is the paramater passed to the
        Pool::*_async() methods.
        """
        self._success   = False
        self._event     = threading.Event()
        self._data      = None
        self._collector = None
        self._callback  = callback

        if collector is not None:
            collector.register_result(self)
            self._collector = collector

        \param collector when not None, the notify_ready() method of
        the collector will be called when the result from the Job is
        ready
        \param callback when not None, function to call when the
        result becomes available (this is the paramater passed to the
        Pool::*_async() methods.
        
recipes/Python/576519_Thread_pool_same_API/recipe-576519.py