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:13:01 +0000 |
commit | 1f192a7ade00b3e1dac8af603e9b48d254100fb6 (patch) | |
tree | 981fb6648a323659935bad6d79a01a73f789c3ae /bitbake/lib/bb/utils.py | |
parent | bc8150d9d4db81006d1f778dedc4e167f5b89a8d (diff) | |
download | poky-1f192a7ade00b3e1dac8af603e9b48d254100fb6.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 8 |
1 files changed, 8 insertions, 0 deletions
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): | |||
839 | pout.flush() | 839 | pout.flush() |
840 | pout.close() | 840 | pout.close() |
841 | 841 | ||
842 | # | ||
843 | # Work around multiprocessing pool bugs in python < 2.7.3 | ||
844 | # | ||
845 | def multiprocessingpool(*args, **kwargs): | ||
846 | if sys.version_info < (2, 7, 3): | ||
847 | return bb.compat.Pool(*args, **kwargs) | ||
848 | else: | ||
849 | return multiprocessing.pool.Pool(*args, **kwargs) | ||
842 | 850 | ||