redefined the API to avoid GC issues during the destruction of the AMAN and its children
This commit is contained in:
@@ -6,18 +6,24 @@ import time
|
||||
from aman.config.Airport import Airport
|
||||
|
||||
class Worker(Thread):
|
||||
def __init__(self, icao : str, configuration : Airport):
|
||||
def __init__(self):
|
||||
Thread.__init__(self)
|
||||
|
||||
def __del__(self):
|
||||
self.release()
|
||||
|
||||
def acquire(self, icao : str, configuration : Airport):
|
||||
self.stopThread = None
|
||||
self.icao = icao
|
||||
self.configuration = configuration
|
||||
self.arrivalRoutes = configuration.gngData.arrivalRoutes
|
||||
self.updateLock = Lock()
|
||||
self.reportQueue = {}
|
||||
self.start()
|
||||
|
||||
def stop(self):
|
||||
def release(self):
|
||||
self.stopThread = True
|
||||
self.join()
|
||||
|
||||
def run(self):
|
||||
counter = 0
|
||||
|
||||
Reference in New Issue
Block a user