mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
commands: Explicitely close the Queue object.
This commit is contained in:
parent
bd1ac36c2c
commit
60a65b831e
@ -121,11 +121,14 @@ def process(f, *args, **kwargs):
|
||||
p.join(timeout)
|
||||
if p.is_alive():
|
||||
p.terminate()
|
||||
q.close()
|
||||
raise ProcessTimeoutError("%s aborted due to timeout." % (p.name,))
|
||||
try:
|
||||
v = q.get(block=False)
|
||||
except Queue.Empty:
|
||||
return None
|
||||
finally:
|
||||
q.close()
|
||||
if isinstance(v, Exception):
|
||||
raise v
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user