Skip to content

Commit

Permalink
Fixed issue with subscriptions not being cleared in external scan
Browse files Browse the repository at this point in the history
If GDA moved outer axis and scans were fast (300Hz), CPU usage would
mount during the scan. This was because on each run() a new subscription
was added to underlying completedSteps attributes. Fix this by removing
the existing subscriptions before adding a new one
  • Loading branch information
peteleicester committed Jan 25, 2017
1 parent e11862e commit ea7885c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions malcolm/parts/builtin/runnablechildpart.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def run(self, task, update_completed_steps):
update_completed_steps (func): The function we should call when
completedSteps should be updated
"""
task.unsubscribe_all()
task.subscribe(
self.child["completedSteps"], update_completed_steps, self)
match_future = self._wait_for_postrun(task)
Expand Down

0 comments on commit ea7885c

Please sign in to comment.