add method wait() to block until every backends answered
This commit is contained in:
parent
0b7f310081
commit
5344220edc
1 changed files with 7 additions and 0 deletions
|
|
@ -157,6 +157,13 @@ class BackendsCall(object):
|
|||
thread.start()
|
||||
return thread
|
||||
|
||||
def wait(self):
|
||||
self.finish_event.wait()
|
||||
|
||||
with self.mutex:
|
||||
if self.errors:
|
||||
raise CallErrors(self.errors)
|
||||
|
||||
def __iter__(self):
|
||||
# Don't know how to factorize with _callback_thread_run
|
||||
responses = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue