exit faster from communicator
This commit is contained in:
parent
eaf61c280a
commit
86fd936d52
@ -69,7 +69,7 @@ class OnionrCommunicatorDaemon:
|
|||||||
self.shared_state.share_object()
|
self.shared_state.share_object()
|
||||||
|
|
||||||
# loop time.sleep delay in seconds
|
# loop time.sleep delay in seconds
|
||||||
self.delay = 1
|
self.delay = 5
|
||||||
|
|
||||||
# amount of threads running by name, used to prevent too many
|
# amount of threads running by name, used to prevent too many
|
||||||
self.threadCounts = {}
|
self.threadCounts = {}
|
||||||
@ -169,11 +169,6 @@ class OnionrCommunicatorDaemon:
|
|||||||
logger.info(
|
logger.info(
|
||||||
'Goodbye. (Onionr is cleaning up, and will exit)', terminal=True)
|
'Goodbye. (Onionr is cleaning up, and will exit)', terminal=True)
|
||||||
|
|
||||||
try:
|
|
||||||
time.sleep(0.5)
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def decrementThreadCount(self, threadName):
|
def decrementThreadCount(self, threadName):
|
||||||
"""Decrement amount of a thread name if more than zero.
|
"""Decrement amount of a thread name if more than zero.
|
||||||
|
|
||||||
|
@ -118,6 +118,7 @@ class SubprocessPOW:
|
|||||||
difficulty = self.difficulty
|
difficulty = self.difficulty
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
#logger.info('still running', terminal=True)
|
||||||
# Break if shutdown received
|
# Break if shutdown received
|
||||||
try:
|
try:
|
||||||
if pipe.poll() and pipe.recv() == 'shutdown':
|
if pipe.poll() and pipe.recv() == 'shutdown':
|
||||||
|
Loading…
Reference in New Issue
Block a user