Skip to content

Commit

Permalink
Merge pull request #225 from tirkarthi/fix-isalive
Browse files Browse the repository at this point in the history
Use is_alive in favour of isAlive for Python 3.9 compatibility.
  • Loading branch information
bgruening authored Apr 26, 2020
2 parents 7697513 + dd3b00d commit 06091e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pulsar/managers/queued.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def shutdown(self, timeout=None):
self.work_queue.put((STOP_SIGNAL, None))
for worker in self.work_threads:
worker.join(timeout)
if worker.isAlive():
if worker.is_alive():
log.warn("Failed to stop worker thread [%s]" % worker)

def run_next(self):
Expand Down
2 changes: 1 addition & 1 deletion pulsar/managers/stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def __init__(self, stateful_manager):
def shutdown(self, timeout=None):
self.active = False
self.thread.join(timeout)
if self.thread.isAlive():
if self.thread.is_alive():
log.warn("Failed to join monitor thread [%s]" % self.thread)

def _run(self):
Expand Down
2 changes: 1 addition & 1 deletion pulsar/messaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __nonzero__(self):
def join(self, timeout=None):
for t in self.threads:
t.join(timeout)
if t.isAlive():
if t.is_alive():
log.warn("Failed to join thread [%s]." % t)


Expand Down

0 comments on commit 06091e4

Please sign in to comment.