diff options
Diffstat (limited to 'bitbake/lib/bb/utils.py')
-rw-r--r-- | bitbake/lib/bb/utils.py | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index c288c826c0..0cf3b1814c 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -12,7 +12,7 @@ import sys | |||
12 | import errno | 12 | import errno |
13 | import logging | 13 | import logging |
14 | import locale | 14 | import locale |
15 | import multiprocessing | 15 | from bb import multiprocessing |
16 | import importlib | 16 | import importlib |
17 | import importlib.machinery | 17 | import importlib.machinery |
18 | import importlib.util | 18 | import importlib.util |
@@ -1479,24 +1479,6 @@ def process_profilelog(fn, fn_out = None): | |||
1479 | p.print_callers() | 1479 | p.print_callers() |
1480 | 1480 | ||
1481 | 1481 | ||
1482 | # | ||
1483 | # Was present to work around multiprocessing pool bugs in python < 2.7.3 | ||
1484 | # | ||
1485 | def multiprocessingpool(*args, **kwargs): | ||
1486 | |||
1487 | import multiprocessing.pool | ||
1488 | #import multiprocessing.util | ||
1489 | #multiprocessing.util.log_to_stderr(10) | ||
1490 | # Deal with a multiprocessing bug where signals to the processes would be delayed until the work | ||
1491 | # completes. Putting in a timeout means the signals (like SIGINT/SIGTERM) get processed. | ||
1492 | def wrapper(func): | ||
1493 | def wrap(self, timeout=None): | ||
1494 | return func(self, timeout=timeout if timeout is not None else 1e100) | ||
1495 | return wrap | ||
1496 | multiprocessing.pool.IMapIterator.next = wrapper(multiprocessing.pool.IMapIterator.next) | ||
1497 | |||
1498 | return multiprocessing.Pool(*args, **kwargs) | ||
1499 | |||
1500 | def exec_flat_python_func(func, *args, **kwargs): | 1482 | def exec_flat_python_func(func, *args, **kwargs): |
1501 | """Execute a flat python function (defined with ``def funcname(args): ...``) | 1483 | """Execute a flat python function (defined with ``def funcname(args): ...``) |
1502 | 1484 | ||