Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 647964 | Differences between
and this patch

Collapse All | Expand All

(-)a/gemato/util.py (+3 lines)
Lines 3-8 Link Here
3
# (c) 2017-2018 Michał Górny
3
# (c) 2017-2018 Michał Górny
4
# Licensed under the terms of 2-clause BSD license
4
# Licensed under the terms of 2-clause BSD license
5
5
6
import gc
6
import multiprocessing
7
import multiprocessing
7
import sys
8
import sys
8
9
Lines 19-24 class MultiprocessingPoolWrapper(object): Link Here
19
        self.pool = multiprocessing.Pool(processes=processes)
20
        self.pool = multiprocessing.Pool(processes=processes)
20
21
21
    def __enter__(self):
22
    def __enter__(self):
23
        gc.disable()
22
        return self
24
        return self
23
25
24
    def __exit__(self, exc_type, exc_value, exc_cb):
26
    def __exit__(self, exc_type, exc_value, exc_cb):
Lines 26-31 class MultiprocessingPoolWrapper(object): Link Here
26
            self.pool.close()
28
            self.pool.close()
27
            self.pool.join()
29
            self.pool.join()
28
        self.pool.terminate()
30
        self.pool.terminate()
31
        gc.enable()
29
32
30
    def map(self, *args, **kwargs):
33
    def map(self, *args, **kwargs):
31
        return self.pool.map(*args, **kwargs)
34
        return self.pool.map(*args, **kwargs)

Return to bug 647964