Signal sender threads to close on shutdown
- when shutdown is running, add a shutdown command to the queues of all sender threads
This commit is contained in:
parent
a381f75b4b
commit
7da36eccbd
|
@ -229,7 +229,10 @@ def doCleanShutdown():
|
|||
time.sleep(.25)
|
||||
|
||||
from class_outgoingSynSender import outgoingSynSender
|
||||
from class_sendDataThread import sendDataThread
|
||||
for thread in threading.enumerate():
|
||||
if isinstance(thread, sendDataThread):
|
||||
thread.sendDataThreadQueue.put((0, 'shutdown','no data'))
|
||||
if thread is not threading.currentThread() and isinstance(thread, StoppableThread) and not isinstance(thread, outgoingSynSender):
|
||||
logger.debug("Waiting for thread %s", thread.name)
|
||||
thread.join()
|
||||
|
|
Loading…
Reference in New Issue
Block a user