introduce a worker thread for the planning tasks

This commit is contained in:
Sven Czarnian
2021-09-02 20:59:02 +02:00
parent 518e80e2fe
commit 64c238899a
2 changed files with 21 additions and 0 deletions

21
aman/sys/Worker.py Normal file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env python
import threading
from aman.config.Airport import Airport
class Worker(threading.Thread):
def __init__(self, icao : str, configuration : Airport):
threading.Thread.__init__(self)
self.stopThread = None
self.icao = icao
self.configuration = configuration
def stop(self):
self.stopThread = True
def run(self):
while None == self.stopThread:
# TODO execute planning, etc.
continue