def parallel(self, threads=4, verbose=True, **kw):
    stop = threading.Event()
    indices = range(len(self.reqs))
    jobs = []
    for ics in chunks(indices, threads):
      mkw = kw.copy()
      mkw.update({"indices":ics, "stop_event":stop, "verbose":False})
      t = threading.Thread(target=self.__call__, kwargs=mkw)
      jobs.append(t)
      t.start()
    try:
      for j in jobs:
        while j.is_alive():
          j.join(1)
          if verbose:
            done = len(self.filter(lambda x: x.response))
            print "Running {} requests... {:.2f}%".format(len(self), done * 100. / len(self)),
          clear_line()
    except __HOLE__:
      stop.set()
    if verbose:
      ## the two extra spaces in the end erase the left over "00%" from "100%"
      print "Running {} requests... done.  ".format(len(self))
dataset/ETHPy150Open tweksteen/burst/burst/http.py/RequestSet.parallel