equal
deleted
inserted
replaced
21 def __init__(self, call, *args, **kwargs): |
21 def __init__(self, call, *args, **kwargs): |
22 self.job = (call, args, kwargs) |
22 self.job = (call, args, kwargs) |
23 self.result = None |
23 self.result = None |
24 self.success = None |
24 self.success = None |
25 self.exc_info = None |
25 self.exc_info = None |
26 self.enabled = False |
|
27 |
26 |
28 def do(self): |
27 def do(self): |
29 """ |
28 """ |
30 do the job by executing the call, and deal with exceptions |
29 do the job by executing the call, and deal with exceptions |
31 """ |
30 """ |
49 self.mutex = Lock() |
48 self.mutex = Lock() |
50 self.todo = Condition(self.mutex) |
49 self.todo = Condition(self.mutex) |
51 self.done = Condition(self.mutex) |
50 self.done = Condition(self.mutex) |
52 self.free = Condition(self.mutex) |
51 self.free = Condition(self.mutex) |
53 self.job = None |
52 self.job = None |
|
53 self.enabled = False |
54 |
54 |
55 def reraise(self, job): |
55 def reraise(self, job): |
56 """ |
56 """ |
57 reraise exception happend in a job |
57 reraise exception happend in a job |
58 @param job: job where original exception happend |
58 @param job: job where original exception happend |