code: def xrange(self, start, stop=None, step=1):
          
          self._assert_active()
          if stop is None:
              start, stop = 0, start
          with self._queuelock:
              pool_loop_reached = max(self._thread_loop_ids)
              # Get this loop id.
              self._thread_loop_ids[self._thread_num] += 1
              loop_id = self._thread_loop_ids[self._thread_num]
              if pool_loop_reached < loop_id:
                  # No thread reached this loop yet. Set up the queue.
                  for idx in range(start, stop, step):
                      self._dynamic_queue.put(idx)
              # Iterate.
              return _QueueIterator(self._dynamic_queue, loop_id, self)
docs: Get an iterator for this threads chunk of work.
  
          This corresponds to using the OpenMP 'dynamic' schedule.