mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-05 06:15:31 +00:00
some little fixes
This commit is contained in:
parent
7d2935ea0d
commit
3eac36d123
2 changed files with 14 additions and 10 deletions
|
|
@ -66,13 +66,17 @@ class RepeatedTimer:
|
|||
"""!Stop the timer worker thread
|
||||
|
||||
@return True or False"""
|
||||
self._event.set()
|
||||
if self._thread is not None:
|
||||
logging.debug("stop repeatedTimer: %s", self._thread.name)
|
||||
self._thread.join()
|
||||
try:
|
||||
self._event.set()
|
||||
if self._thread is not None:
|
||||
logging.debug("stop repeatedTimer: %s", self._thread.name)
|
||||
self._thread.join()
|
||||
return True
|
||||
logging.warning("repeatedTimer always stopped")
|
||||
return True
|
||||
logging.warning("repeatedTimer always stopped")
|
||||
return False
|
||||
except: # pragma: no cover
|
||||
logging.exception("cannot stop repeatedTimer")
|
||||
return False
|
||||
|
||||
def _target(self):
|
||||
"""!Runs the target function with his arguments in own thread"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue