fixed stop button, no can interrupt running experiment
Build Debian Packages / build (trixie, debian13) (push) Successful in 15m23s
Build Debian Packages / build (bookworm, debian12) (push) Successful in 15m46s
Build Debian Packages / build (bullseye, debian11) (push) Has been cancelled

This commit is contained in:
2026-07-04 21:03:23 +02:00
parent 58e7846bbe
commit 80d8f1e78d
+8 -2
View File
@@ -471,9 +471,10 @@ class DamarisGUI:
self.id = self.lockfile.add_experiment()
while not self.lockfile.am_i_next():
self.stop_experiment_flag.wait(interval)
while gtk.events_pending():
gtk.main_iteration_do(False)
if self.stop_experiment_flag.wait(interval):
break
if loop_run > 1:
self.experiment_script_statusbar_label.set_text("Waiting for other experiment to finish")
loop_run = 0
@@ -524,7 +525,10 @@ class DamarisGUI:
print("waiting for threads stoping...", end=' ')
still_running = [x for x in [ self.si.exp_handling, self.si.res_handling, self.si.back_driver ] if x is not None and x.is_alive( )]
for t in still_running:
t.join( )
while t.is_alive():
while gtk.events_pending():
gtk.main_iteration_do(False)
t.join( 0.05 )
print("done")
# cleanup
@@ -3312,6 +3316,8 @@ class ScriptInterface:
self.back_driver.start( )
while (not self.back_driver.quit_flag.isSet( ) and \
(self.back_driver.core_pid is None or self.back_driver.core_pid <= 0)):
while gtk.events_pending():
gtk.main_iteration_do(False)
self.back_driver.quit_flag.wait( 0.1 )
if self.exp_handling:
self.exp_handling.start( )