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 {