@@ -141,13 +141,13 @@ def stop(self, reason="stopped", automated_thread=True):
141
141
time .sleep (2 )
142
142
self .__automated_threads = not automated_thread
143
143
self .__lock .release ()
144
- while self .__auto_delete_thread_stopped :
144
+ while not self .__auto_delete_thread_stopped :
145
145
time .sleep (0.1 )
146
- while self .__auto_space_checker_thread_stopped :
146
+ while not self .__auto_space_checker_thread_stopped :
147
147
time .sleep (0.1 )
148
148
if self .__debug :
149
149
self .__debug_thread = False
150
- while self .__debug_thread_stopped :
150
+ while not self .__debug_thread_stopped :
151
151
time .sleep (0.1 )
152
152
self .__engine = None
153
153
self .__db_hook = None
@@ -416,9 +416,8 @@ def __pause_bridge_because_of_no_space(self):
416
416
previous_time_s = 0
417
417
while True :
418
418
if not self .__automated_threads :
419
- with self .__lock :
420
- self .__auto_space_checker_thread_stopped = True
421
- return
419
+ self .__auto_space_checker_thread_stopped = True
420
+ return
422
421
current_time_s = int (time .time ())
423
422
if current_time_s - previous_time_s > 5 :
424
423
previous_time_s = int (current_time_s )
@@ -439,9 +438,8 @@ def __auto_delete_old_files(self):
439
438
previous_time_s = 0
440
439
while True :
441
440
if not self .__automated_threads :
442
- with self .__lock :
443
- self .__auto_delete_thread_stopped = True
444
- return
441
+ self .__auto_delete_thread_stopped = True
442
+ return
445
443
current_time_s = int (time .time ())
446
444
if current_time_s - previous_time_s > 5 :
447
445
previous_time_s = int (current_time_s )
0 commit comments