@@ -682,11 +682,11 @@ def __exit__(self, exc_type, exc_val, exc_tb):
682682
683683class ApplyResult (object ):
684684
685- def __init__ (self , pool , callback , error_callback , cache = None ):
685+ def __init__ (self , pool , callback , error_callback ):
686686 self ._pool = pool
687687 self ._event = threading .Event ()
688688 self ._job = next (job_counter )
689- self ._cache = cache if cache is not None else pool ._cache
689+ self ._cache = pool ._cache
690690 self ._callback = callback
691691 self ._error_callback = error_callback
692692 self ._cache [self ._job ] = self
@@ -729,7 +729,7 @@ def _set(self, i, obj):
729729
730730class MapResult (ApplyResult ):
731731
732- def __init__ (self , pool , chunksize , length , callback , error_callback , cache = None ):
732+ def __init__ (self , pool , chunksize , length , callback , error_callback ):
733733 ApplyResult .__init__ (self , pool , callback ,
734734 error_callback = error_callback )
735735 self ._success = True
@@ -772,11 +772,11 @@ def _set(self, i, success_result):
772772
773773class IMapIterator (object ):
774774
775- def __init__ (self , pool , cache = None ):
775+ def __init__ (self , pool ):
776776 self ._pool = pool
777777 self ._cond = threading .Condition (threading .Lock ())
778778 self ._job = next (job_counter )
779- self ._cache = cache if cache is not None else pool ._cache
779+ self ._cache = pool ._cache
780780 self ._items = collections .deque ()
781781 self ._index = 0
782782 self ._length = None
0 commit comments