Skip to content
Snippets Groups Projects
Commit 051f7822 authored by shinedday's avatar shinedday
Browse files

Fix infinit waiting

parent 3b3dd420
Branches
Tags
No related merge requests found
......@@ -160,6 +160,7 @@ class Amas(Schedulable):
"""
exit the program at the end of the cycle
"""
self.put_token()
self.scheduler.exit_bool = True
def set_sleep(self, sleep_time) -> None:
......
......@@ -91,6 +91,8 @@ class Scheduler():
while not self.exit_bool:
self.__semaphore_start_stop.acquire()
if not self.exit_bool:
return
self.__semaphore_start_stop.release()
threads = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment