Skip to content

Commit a4c3469

Browse files
committed
Empty the multiprocessing queue before terminating it
1 parent 31a59c9 commit a4c3469

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/toolchains/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,9 @@ def compile_queue(self, queue, objects):
794794
])
795795
objects.append(result['object'])
796796
except ToolException, err:
797+
if p._taskqueue.queue:
798+
p._taskqueue.queue.clear()
799+
sleep(0.5)
797800
p.terminate()
798801
p.join()
799802
raise ToolException(err)

0 commit comments

Comments
 (0)