diff --git a/changelog.md b/changelog.md index 133f20fc3..eb813e7c4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +# Unreleased + +### Fixed + +- Fix `join_thread` missing attribute in `SimpleQueue` when cleaning a multiprocessing executor + ## v0.14.0 (2024-11-14) ### Added diff --git a/edsnlp/processing/multiprocessing.py b/edsnlp/processing/multiprocessing.py index af288c0a2..673940d3d 100644 --- a/edsnlp/processing/multiprocessing.py +++ b/edsnlp/processing/multiprocessing.py @@ -452,7 +452,8 @@ def run(self): for stage in self.stages_to_run: for name, queue in self.consumer_queues(stage): queue.close() - queue.join_thread() + if hasattr(queue, "join_thread"): + queue.join_thread() self.final_barrier.wait() @@ -1182,7 +1183,8 @@ def feed_queue(self, queue, items): if q is queue: queue.put(STOP) queue.close() - queue.join_thread() + if hasattr(queue, "join_thread"): + queue.join_thread() def dequeue_notifications(self): while True: