Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1069 from mrosanes/cleareventset
Browse files Browse the repository at this point in the history
clear the event set, before macro commnads
  • Loading branch information
daneos authored Mar 6, 2019
2 parents 04e6e67 + 0f8e575 commit 88ebbdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sardana/taurus/core/tango/sardana/macroserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ def _runMacro(self, xml, synch=False):
evt_wait.lock()
try:
evt_wait.waitEvent(self.Running, equal=False, timeout=timeout)
# Clear event set to not confuse the value coming from the
# connection with the event of of end of the macro execution
# in the next wait event. This was observed on Windows where
# the time stamp resolution is not better than 1 ms.
evt_wait.clearEventSet()
ts = time.time()
result = self.command_inout("RunMacro", [etree.tostring(xml)])
evt_wait.waitEvent(self.Running, after=ts, timeout=timeout)
Expand Down

0 comments on commit 88ebbdd

Please sign in to comment.