code: def map(self, func, *iterables, **kwargs):
          
          with self._lock:
              if self._closing:
                  raise RuntimeError('pool is closing/closed')
              timeout = kwargs.pop('timeout', None)
              futures = []
              for args in zip(*iterables):
                  result = Future()
                  self._queue.put_nowait((func, args, result))
                  futures.append(result)
              self._spawn_workers()
          try:
              with switch_back(timeout):
                  for future in futures:
                      yield future.result()
          except Exception:
              # Timeout, GeneratorExit or future.set_exception()
              for future in futures:
                  if not future.done():
                      future.cancel()
              raise
docs: Apply *func* to the elements of the sequences in *iterables*.
  
          All invocations of *func* are run in the pool. If multiple iterables
          are provided, then *func* must take this many arguments, and is applied
          with one element from each iterable. All iterables must yield the same
          number of elements.
  
          An optional *timeout* keyword argument may be provided to specify a
          timeout.
  
          This returns a generator yielding the results.