Empty the multiprocessing queue before terminating it

pull/2341/head
Mihail Stoyanov 2016-08-02 11:44:13 +01:00
parent 31a59c930d
commit a4c3469b7b
1 changed files with 3 additions and 0 deletions

View File

@ -794,6 +794,9 @@ class mbedToolchain:
])
objects.append(result['object'])
except ToolException, err:
if p._taskqueue.queue:
p._taskqueue.queue.clear()
sleep(0.5)
p.terminate()
p.join()
raise ToolException(err)