mirror of https://github.com/nucypher/nucypher.git
Stop Alice's publication threadpool in disenchant().
parent
c9d176e972
commit
e7e710bb36
|
@ -133,7 +133,6 @@ class Alice(Character, BlockchainPolicyAuthor):
|
|||
|
||||
self.publication_threadpool = ThreadPool(maxthreads=120, name="Alice Policy Publication") # In the future, this value is perhaps best set to something like 3-4 times the optimal "high n", whatever we determine that to be.
|
||||
self.publication_threadpool.start()
|
||||
reactor.addSystemEventTrigger("before", "shutdown", self.publication_threadpool.stop) # TODO: Congregate Character Stop activity.
|
||||
else:
|
||||
self.m = STRANGER_ALICE
|
||||
self.n = STRANGER_ALICE
|
||||
|
@ -445,6 +444,11 @@ class Alice(Character, BlockchainPolicyAuthor):
|
|||
|
||||
return controller
|
||||
|
||||
def disenchant(self):
|
||||
super().disenchant()
|
||||
self.publication_threadpool.stop()
|
||||
|
||||
|
||||
|
||||
class Bob(Character):
|
||||
banner = BOB_BANNER
|
||||
|
|
|
@ -344,14 +344,14 @@ def random_policy_label():
|
|||
def federated_alice(alice_federated_test_config):
|
||||
alice = alice_federated_test_config.produce()
|
||||
yield alice
|
||||
alice.publication_threadpool.stop()
|
||||
alice.disenchant()
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def blockchain_alice(alice_blockchain_test_config, testerchain):
|
||||
alice = alice_blockchain_test_config.produce()
|
||||
yield alice
|
||||
alice.publication_threadpool.stop()
|
||||
alice.disenchant()
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
|
|
Loading…
Reference in New Issue