parameters: (self, func, iterable, chunksize=1)
docstring: Equivalent of `map()` -- can be MUCH slower than `Pool.map()`.
docstring_summary: Equivalent of `map()` -- can be MUCH slower than `Pool.map()`.
docstring_tokens: Equivalent of map () -- can be MUCH slower than Pool . map () .
function: def imap(self, func, iterable, chunksize=1):
          '''
          Equivalent of `map()` -- can be MUCH slower than `Pool.map()`.
          '''
          self._check_running()
          if chunksize == 1:
              result = IMapIterator(self)
              self._taskqueue.put(
                  (
                      self._guarded_task_generation(result._job, func, iterable),
                      result._set_length
                  ))
              return result
          else:
              if chunksize < 1:
                  raise ValueError(
                      "Chunksize must be 1+, not {0:n}".format(
                          chunksize))
              task_batches = Pool._get_tasks(func, iterable, chunksize)
              result = IMapIterator(self)
              self._taskqueue.put(
                  (
                      self._guarded_task_generation(result._job,
                                                    mapstar,
                                                    task_batches),
                      result._set_length
                  ))
              return (item for chunk in result for item in chunk)
function_tokens: def imap ( self , func , iterable , chunksize = 1 ) : self . _check_running ( ) if chunksize == 1 : result = IMapIterator ( self ) self . _taskqueue . put ( ( self . _guarded_task_generation ( result . _job , func , iterable ) , result . _set_length ) ) return result else : if chunksize < 1 : raise ValueError ( "Chunksize must be 1+, not {0:n}" . format ( chunksize ) ) task_batches = Pool . _get_tasks ( func , iterable , chunksize ) result = IMapIterator ( self ) self . _taskqueue . put ( ( self . _guarded_task_generation ( result . _job , mapstar , task_batches ) , result . _set_length ) ) return ( item for chunk in result for item in chunk )