Lines Matching refs:iterable
246 def map(self, func, iterable, chunksize=None): argument
251 return self.map_async(func, iterable, chunksize).get()
253 def imap(self, func, iterable, chunksize=1): argument
261 for i, x in enumerate(iterable)), result._set_length))
265 task_batches = Pool._get_tasks(func, iterable, chunksize)
271 def imap_unordered(self, func, iterable, chunksize=1): argument
279 for i, x in enumerate(iterable)), result._set_length))
283 task_batches = Pool._get_tasks(func, iterable, chunksize)
298 def map_async(self, func, iterable, chunksize=None, callback=None): argument
303 if not hasattr(iterable, '__len__'):
304 iterable = list(iterable)
307 chunksize, extra = divmod(len(iterable), len(self._pool) * 4)
310 if len(iterable) == 0:
313 task_batches = Pool._get_tasks(func, iterable, chunksize)
314 result = MapResult(self._cache, chunksize, len(iterable), callback)