parameters: (self, func, iterable, chunksize=1)
docstring: Like `imap()` method but ordering of results is arbitrary
docstring_summary: Like `imap()` method but ordering of results is arbitrary
docstring_tokens: Like imap () method but ordering of results is arbitrary
function: def imap_unordered(self, func, iterable, chunksize=1):
          '''
          Like `imap()` method but ordering of results is arbitrary
          '''
          assert self._state == RUN
          if chunksize == 1:
              result = IMapUnorderedIterator(self._cache)
              self._taskqueue.put((((result._job, i, func, (x,), {})
                           for i, x in enumerate(iterable)), result._set_length))
              return result
          else:
              assert chunksize > 1
              task_batches = Pool._get_tasks(func, iterable, chunksize)
              result = IMapUnorderedIterator(self._cache)
              self._taskqueue.put((((result._job, i, mapstar, (x,), {})
                       for i, x in enumerate(task_batches)), result._set_length))
              return (item for chunk in result for item in chunk)
function_tokens: def imap_unordered ( self , func , iterable , chunksize = 1 ) : assert self . _state == RUN if chunksize == 1 : result = IMapUnorderedIterator ( self . _cache ) self . _taskqueue . put ( ( ( ( result . _job , i , func , ( x , ) , { } ) for i , x in enumerate ( iterable ) ) , result . _set_length ) ) return result else : assert chunksize > 1 task_batches = Pool . _get_tasks ( func , iterable , chunksize ) result = IMapUnorderedIterator ( self . _cache ) self . _taskqueue . put ( ( ( ( result . _job , i , mapstar , ( x , ) , { } ) for i , x in enumerate ( task_batches ) ) , result . _set_length ) ) return ( item for chunk in result for item in chunk )