Skip to content
Snippets Groups Projects
Commit 1f2ccab6 authored by shined day's avatar shined day
Browse files

Merge branch '27-exit-is-not-working' into 'master'

Resolve "Exit is not working"

Closes #27

See merge request be-pyamak/pyamak-noyau!15
parents 5a3b7688 3f70d181
Branches
Tags
No related merge requests found
......@@ -165,6 +165,7 @@ class Amas(Schedulable, Loggable):
"""
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 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