Skip to content

Commit

Permalink
Replace deprecated notifyAll with notify_all
Browse files Browse the repository at this point in the history
`notifyAll` would cause a deprecation warning that added a test failure
with Python 3.10.
There is no need to keep using the camel case alias.
  • Loading branch information
k-dominik committed May 8, 2024
1 parent f579ac8 commit 54f2756
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lazyflow/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def _decrementOperatorExecutionCount(self):
assert self._executionCount > 0, "BUG: Can't decrement the execution count below zero!"
with self._condition:
self._executionCount -= 1
self._condition.notifyAll()
self._condition.notify_all()

def propagateDirty(self, slot, subindex, roi):
"""This method is called when an output of another operator on
Expand Down Expand Up @@ -473,7 +473,7 @@ def wrapper(self, *args, **kwargs):
return func(self, *args, **kwargs)
finally:
self._settingUp = False
self._condition.notifyAll()
self._condition.notify_all()

wrapper.__wrapped__ = func # Emulate python 3 behavior of @wraps
return wrapper
Expand All @@ -499,7 +499,7 @@ def _setupOutputs(self):
self._setup_count += 1

self._settingUp = False
self._condition.notifyAll()
self._condition.notify_all()

try:
# Determine new "ready" flags
Expand Down
4 changes: 2 additions & 2 deletions lazyflow/operators/cacheMemoryManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def setRefreshInterval(self, t):
"""
with self._condition:
self._refresh_interval = t
self._condition.notifyAll()
self._condition.notify_all()

def disable(self):
"""
Expand All @@ -274,7 +274,7 @@ def enable(self):
with self._disable_lock:
self._disabled = False
with self._condition:
self._condition.notifyAll()
self._condition.notify_all()


_cache_memory_manager = _CacheMemoryManager()
Expand Down

0 comments on commit 54f2756

Please sign in to comment.