def __init__(self, to_notify = None):
        """
        \param to_notify ApplyResult object to notify when all the
        results we're waiting for become available. Can be None.
        """
        AbstractResultCollector.__init__(self, to_notify)
        self._cond       = threading.Condition()
        self._collection = []
        self._expected   = 0

        \param to_notify ApplyResult object to notify when all the
        results we're waiting for become available. Can be None.
        
recipes/Python/576519_Thread_pool_same_API/recipe-576519.py