shutdown quality fixes
This commit is contained in:
parent
6f91ba1b33
commit
503d0b33d0
|
@ -1,3 +1,4 @@
|
|||
"""shutdown function"""
|
||||
import os
|
||||
import Queue
|
||||
import threading
|
||||
|
@ -15,8 +16,7 @@ from queues import (
|
|||
|
||||
|
||||
def doCleanShutdown():
|
||||
# Used to tell proof of work worker threads
|
||||
# and the objectProcessorThread to exit.
|
||||
"""Used to tell proof of work worker threads and the objectProcessorThread to exit."""
|
||||
state.shutdown = 1
|
||||
|
||||
objectProcessorQueue.put(('checkShutdownVariable', 'no data'))
|
||||
|
@ -76,10 +76,10 @@ def doCleanShutdown():
|
|||
except Queue.Empty:
|
||||
break
|
||||
|
||||
if shared.thisapp.daemon or not state.enableGUI: # FIXME redundant?
|
||||
if shared.thisapp.daemon or not state.enableGUI: # ..fixme:: redundant?
|
||||
logger.info('Clean shutdown complete.')
|
||||
shared.thisapp.cleanup()
|
||||
os._exit(0)
|
||||
os._exit(0) # pylint: disable=protected-access
|
||||
else:
|
||||
logger.info('Core shutdown complete.')
|
||||
for thread in threading.enumerate():
|
||||
|
|
Loading…
Reference in New Issue
Block a user