diff options
Diffstat (limited to 'bitbake/lib/bb')
| -rw-r--r-- | bitbake/lib/bb/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index f62709bed5..4c894cbb0c 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
| @@ -884,5 +884,17 @@ def process_profilelog(fn): | |||
| 884 | # Was present to work around multiprocessing pool bugs in python < 2.7.3 | 884 | # Was present to work around multiprocessing pool bugs in python < 2.7.3 |
| 885 | # | 885 | # |
| 886 | def multiprocessingpool(*args, **kwargs): | 886 | def multiprocessingpool(*args, **kwargs): |
| 887 | |||
| 888 | import multiprocessing.pool | ||
| 889 | #import multiprocessing.util | ||
| 890 | #multiprocessing.util.log_to_stderr(10) | ||
| 891 | # Deal with a multiprocessing bug where signals to the processes would be delayed until the work | ||
| 892 | # completes. Putting in a timeout means the signals (like SIGINT/SIGTERM) get processed. | ||
| 893 | def wrapper(func): | ||
| 894 | def wrap(self, timeout=None): | ||
| 895 | return func(self, timeout=timeout if timeout is not None else 1e100) | ||
| 896 | return wrap | ||
| 897 | multiprocessing.pool.IMapIterator.next = wrapper(multiprocessing.pool.IMapIterator.next) | ||
| 898 | |||
| 887 | return multiprocessing.Pool(*args, **kwargs) | 899 | return multiprocessing.Pool(*args, **kwargs) |
| 888 | 900 | ||
