From cbe713be36cfb296e2f3abb21e8f2ea7f0944a87 Mon Sep 17 00:00:00 2001 From: Robin Fievet Date: Mon, 19 Aug 2024 12:59:55 -0400 Subject: [PATCH] remove threading and add prints --- LIReC/lib/pool.py | 3 +++ run_lirec.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LIReC/lib/pool.py b/LIReC/lib/pool.py index 2d1ad98..628543d 100644 --- a/LIReC/lib/pool.py +++ b/LIReC/lib/pool.py @@ -50,13 +50,16 @@ class WorkerPool: result_queues: Dict[str, Queue] def __init__(self: WorkerPool) -> None: + print('Starting __init__ WorkerPool ...') self.manager = Manager() self.job_queue = self.manager.Queue() self.log_queue = self.manager.Queue() self.result_queues = {} def start(self: WorkerPool, modules: Dict[str, Any]): # -> module_id, timings + print('Starting WorkerPool ...') Process(target=print_logger, args=(self.log_queue,)).start() + print("Process started") pipes = [] for i, (module_path, module_config) in enumerate(modules): module_id = f'{i}@{module_path}' diff --git a/run_lirec.py b/run_lirec.py index 1e4d137..4b891aa 100644 --- a/run_lirec.py +++ b/run_lirec.py @@ -29,6 +29,7 @@ def run_lirec(): # Assuming LIReC has an entry point in its package # Run LIReC (same as from run_jobs.py) from LIReC.jobs import run + print("Running run.main()") run.main() def main(): @@ -39,8 +40,8 @@ def main(): # run_lirec() # Start the print_status function in a background thread - status_thread = threading.Thread(target=print_status, daemon=True) - status_thread.start() + # status_thread = threading.Thread(target=print_status, daemon=True) + # status_thread.start() # The rest of the functions can now execute without being blocked by print_status # install_python()