kazoo icon indicating copy to clipboard operation
kazoo copied to clipboard

Function cancel doesn't work as expected

Open ctang90 opened this issue 10 years ago • 0 comments

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()

ctang90 avatar Jan 07 '15 00:01 ctang90