예제 #1
0
 def __call__(self, r=0, throw=False):
     if r:
         return restart(r=r-1)
     if throw:
         raise ValueError('Err!')
     return self.task(err='Err!')
예제 #2
0
 def call(self, should_restart=True):
     if should_restart:
         return restart(should_restart=False)
     return 1
예제 #3
0
 def __call__(self, a=None, b=None, err=None, r=0):
     if r:
         return restart(a, b, err, r=r-1)
     return tactivity(a, b, err)
예제 #4
0
 def __call__(self, n, r=True):
     if r:
         return restart(n, r=False)
     return parallel_reduce(self.r, map(self.m, range(n + 1)))
예제 #5
0
 def __call__(self, r=True):
     a = self.task()
     return restart(a, 2)
예제 #6
0
파일: test_local.py 프로젝트: xethorn/flowy
 def __call__(self, r=0, throw=False):
     if r:
         return restart(r=r - 1)
     if throw:
         raise ValueError('Err!')
     return self.task(err='Err!')
예제 #7
0
파일: test_local.py 프로젝트: xethorn/flowy
 def __call__(self, n, r=True):
     if r:
         return restart(n, r=False)
     return parallel_reduce(self.r, map(self.m, range(n + 1)))
예제 #8
0
파일: test_local.py 프로젝트: xethorn/flowy
 def __call__(self, a=None, b=None, err=None, r=0):
     if r:
         return restart(a, b, err, r=r - 1)
     return tactivity(a, b, err)
예제 #9
0
 def call(self, should_restart=True):
     if should_restart:
         return restart(should_restart=False)
     return 1