diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 00:28:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:09:53 +0000 |
commit | c9eb742637131e8dbd526d2ad9b458abea0a2d87 (patch) | |
tree | c14cf9d1aa152840ce79281b098fd93d14fc2923 /lib/bb/utils.py | |
parent | 63774f5b4edb999300bddd891233f6050f4af877 (diff) | |
download | bitbake-c9eb742637131e8dbd526d2ad9b458abea0a2d87.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r-- | lib/bb/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py index 7e81df585..83159a646 100644 --- a/lib/bb/utils.py +++ b/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) |