'Set the number of worker threads that should be created.'

def setNumThreads(self, num):

    assert (not self.prepared), "Can't    change    number    of    threads    after    start"
    self.threads = num
