Home | History | Annotate | Download | only in multiprocessing

Lines Matching refs:chunksize

245     def map(self, func, iterable, chunksize=None):
250 return self.map_async(func, iterable, chunksize).get()
252 def imap(self, func, iterable, chunksize=1):
257 if chunksize == 1:
263 assert chunksize > 1
264 task_batches = Pool._get_tasks(func, iterable, chunksize)
270 def imap_unordered(self, func, iterable, chunksize=1):
275 if chunksize == 1:
281 assert chunksize > 1
282 task_batches = Pool._get_tasks(func, iterable, chunksize)
297 def map_async(self, func, iterable, chunksize=None, callback=None):
305 if chunksize is None:
306 chunksize, extra = divmod(len(iterable), len(self._pool) * 4)
308 chunksize += 1
310 chunksize = 0
312 task_batches = Pool._get_tasks(func, iterable, chunksize)
313 result = MapResult(self._cache, chunksize, len(iterable), callback)
576 def __init__(self, cache, chunksize, length, callback):
580 self._chunksize = chunksize
581 if chunksize <= 0:
586 self._number_left = length//chunksize + bool(length % chunksize)