mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
commands.process: return immediately when terminating process, without having to deal with the queue.
otherwise, we have to block for $smalldelay between putting and getting the item, since queue putting is not instantaneous and sometimes we would get 'nothing returned' instead of the timeout message. Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
7f4a1be9f9
commit
141b120a9c
@ -82,7 +82,7 @@ def process(f, *args, **kwargs):
|
|||||||
p.join(timeout)
|
p.join(timeout)
|
||||||
if p.is_alive():
|
if p.is_alive():
|
||||||
p.terminate()
|
p.terminate()
|
||||||
q.put("%s aborted due to timeout." % (p.name,))
|
return "%s aborted due to timeout." % (p.name,)
|
||||||
try:
|
try:
|
||||||
v = q.get(block=False)
|
v = q.get(block=False)
|
||||||
except Queue.Empty:
|
except Queue.Empty:
|
||||||
|
Loading…
Reference in New Issue
Block a user