From eaa8391b226a1e1572ee24c1942f5ed17835a465 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Sun, 29 Dec 2019 23:45:26 +0000 Subject: [PATCH] Scanning: switch to ThreadPool for threading. --- volatility/framework/interfaces/layers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/volatility/framework/interfaces/layers.py b/volatility/framework/interfaces/layers.py index 8d80247d5..538473063 100644 --- a/volatility/framework/interfaces/layers.py +++ b/volatility/framework/interfaces/layers.py @@ -252,12 +252,12 @@ class DataLayerInterface(interfaces.configuration.ConfigurableInterface, metacla yield from scan_chunk(value) else: progress = multiprocessing.Manager().Value("Q", 0) - parallel_module = multiprocessing + parallel_module = multiprocessing.pool.Pool if constants.PARALLELISM == constants.Parallelism.Threading: progress = DummyProgress() - parallel_module = threading + parallel_module = multiprocessing.pool.ThreadPool scan_chunk = functools.partial(self._scan_chunk, scanner, progress) - with parallel_module.Pool() as pool: + with parallel_module() as pool: result = pool.map_async(scan_chunk, scan_iterator()) while not result.ready(): if progress_callback: