From 1f192a7ade00b3e1dac8af603e9b48d254100fb6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 6 Feb 2013 00:28:08 +0000 Subject: bitbake: compat/utils: Add copy of python multiprocessing pool for pre 2.7.3 issues python 2.7 shows hangs with issues in its pool implmenetation. Rather than try and hack around these, add a copy of the working pool implementation to the compat module from 2.7.3. (Bitbake rev: c9eb742637131e8dbd526d2ad9b458abea0a2d87) Signed-off-by: Richard Purdie --- bitbake/lib/bb/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bitbake/lib/bb/utils.py') diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 7e81df5855..83159a6465 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -839,4 +839,12 @@ def process_profilelog(fn): pout.flush() pout.close() +# +# Work around multiprocessing pool bugs in python < 2.7.3 +# +def multiprocessingpool(*args, **kwargs): + if sys.version_info < (2, 7, 3): + return bb.compat.Pool(*args, **kwargs) + else: + return multiprocessing.pool.Pool(*args, **kwargs) -- cgit v1.2.3-54-g00ecf