kazoo
kazoo copied to clipboard
Function cancel doesn't work as expected
Hi, When I call cancel(), run() will not return until all the previous leaders exited. However, my understanding is that run() will return immediately when cancel get called. Am I wrong?
My code is as follows. def enter_election(self, callback): self.election = self.zk.Election(master_path, self.seq) self.election.run(callback, self) def signal_handler(self, signal, frame): print 'Interrupt' self.election.cancel()