Skip to content

Commit

Permalink
Change the way listens are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
slacrherbst committed Sep 27, 2024
1 parent 65e1410 commit 6598340
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions python/pyrogue/_Root.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,13 @@ def _queueUpdates(self,var):
self._updateTrack[tid] = UpdateTracker(self._updateQueue)
self._updateTrack[tid].update(var)

# Recursively add listeners to update list
def _recurseAddListeners(self, nvars, var):
for vl in var._listeners:
nvars[vl.path] = vl

self._recurseAddListeners(nvars, vl)

# Worker thread
def _updateWorker(self):
""" """
Expand All @@ -1029,8 +1036,7 @@ def _updateWorker(self):
# Copy list and add listeners
nvars = uvars.copy()
for p,v in uvars.items():
for vl in v._listeners:
nvars[vl.path] = vl
self._recurseAddListeners(nvars, v)

# Process the new list
for p,v in nvars.items():
Expand Down

0 comments on commit 6598340

Please sign in to comment.