introduce a worker thread for the planning tasks
このコミットが含まれているのは:
21
aman/sys/Worker.py
ノーマルファイル
21
aman/sys/Worker.py
ノーマルファイル
@@ -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
|
||||||
0
aman/sys/__init__.py
ノーマルファイル
0
aman/sys/__init__.py
ノーマルファイル
新しいイシューから参照
ユーザーをブロックする