def double(n): prunner.post_task(sum_up, n) prunner.post_task(sum_up, n)
def init(numbers): for i in numbers: prunner.post_task(add_one, i)
def add_one(n): prunner.post_task(double, n + 1)
def begin(): prunner.get_dict()['sum'] = 0 prunner.post_task(init, range(2000))
def double(self, n): prunner.post_task(self.sum_up, n) prunner.post_task(self.sum_up, n)
def add_one(self, n): prunner.post_task(self.double, n + 1)
def init(self, numbers): for i in numbers: prunner.post_task(self.add_one, i)