Commit 3ef7d4b4 authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch '30_fix_wait_method' into 'master'

Fix wait method

Closes #30

See merge request !67
parents 74ad0985 f0d4a464
Pipeline #36728 failed with stages
in 90 minutes and 2 seconds
......@@ -223,7 +223,12 @@ class DBExecutor(object):
def wait(self):
"""Wait for the message handle to finish"""
self.message_handler.join()
try:
self.message_handler.join()
except RuntimeError:
# tried to join the handler before it has started.
pass
self.message_handler = None
def __str__(self):
......
......@@ -291,7 +291,12 @@ class LoopExecutor(object):
def wait(self):
"""Wait for the message handle to finish"""
self.message_handler.join()
try:
self.message_handler.join()
except RuntimeError:
# tried to join the handler before it has started.
pass
self.message_handler = None
def close(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment