From a4c3469b7b9eb9132a7dae1aa3ee98baa73eef3c Mon Sep 17 00:00:00 2001 From: Mihail Stoyanov Date: Tue, 2 Aug 2016 11:44:13 +0100 Subject: [PATCH] Empty the multiprocessing queue before terminating it --- tools/toolchains/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index c6735157dd..f0b509e9af 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -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)