From 9b98dbe27bebf9194038f7b4003655049e5d44a3 Mon Sep 17 00:00:00 2001 From: jze9 Date: Wed, 8 Jul 2026 05:30:25 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20=D1=88?= =?UTF-8?q?=D1=83=D0=BC=20=D1=84=D0=B8=D0=BD=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B8=20=D0=BF=D1=80=D0=B8=20=D0=B7=D0=B0=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=88=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=86=D0=B8=D0=BA=D0=BB?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit queue.close()+join_thread() после writer.join(): иначе семафоры очереди финализируются в гонке с resource_tracker на выходе интерпретатора и после каждого цикла в журнал сыпалось «Exception ignored … sem_unlink FileNotFoundError». Проверено репродукцией: stderr пуст. Co-Authored-By: Claude Fable 5 --- src/gausse/optim/evolutionary.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gausse/optim/evolutionary.py b/src/gausse/optim/evolutionary.py index df9f47c..e6a5bb7 100644 --- a/src/gausse/optim/evolutionary.py +++ b/src/gausse/optim/evolutionary.py @@ -199,6 +199,11 @@ def run_evolution( break except KeyboardInterrupt: continue # уже завершаемся; ждём писателя до конца + # явно закрыть очередь: иначе её семафоры финализируются в гонке с + # resource_tracker на выходе интерпретатора и сыплют в журнал + # «Exception ignored … sem_unlink FileNotFoundError» после каждого цикла + queue.close() + queue.join_thread() logger._write("база дописана полностью") assert best_pair is not None @@ -215,6 +220,8 @@ def run_evolution( conn_queue.put(build_run_record(polished_genome, polished_result, db, search_mode="evolve-polish")) conn_queue.put(None) polish_writer.join() + conn_queue.close() + conn_queue.join_thread() best_genome, best_result = polished_genome, polished_result return {