\r
def initOverlayClass(self):\r
self._event = threading.Event()\r
- self._monitorThread = threading.Thread(target=self._monitor)\r
+ self._monitorThread = None\r
self._keepMonitoring = False\r
\r
def startMonitoring(self):\r
+ if self._monitorThread:\r
+ return\r
+ self._monitorThread = threading.Thread(target=self._monitor)\r
self._keepMonitoring = True\r
self._monitorThread.start()\r
\r
def stopMonitoring(self):\r
+ if not self._monitorThread:\r
+ return\r
self._keepMonitoring = False\r
self._event.set()\r
self._monitorThread = None\r