Skip to content

Commit 6ca39f7

Browse files
committedDec 11, 2014
management/scheduler: improve periodic timing precision
1 parent d315268 commit 6ca39f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎artiq/management/scheduler.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def _run_periodic(self):
9898

9999
@asyncio.coroutine
100100
def _schedule(self):
101-
next_periodic = yield from self._run_periodic()
102101
while True:
102+
next_periodic = yield from self._run_periodic()
103103
ev_queue = asyncio.Task(self.queue_count.acquire())
104104
ev_periodic = asyncio.Task(self.periodic_modified.wait())
105105
done, pend = yield from asyncio.wait(
@@ -109,7 +109,7 @@ def _schedule(self):
109109
for t in pend:
110110
t.cancel()
111111

112-
next_periodic = yield from self._run_periodic()
112+
yield from self._run_periodic()
113113
if ev_queue in done:
114114
rid, run_params, timeout = self.queued.pop(0)
115115
result = yield from self._run(rid, run_params, timeout)

0 commit comments

Comments
 (0)
Please sign in to comment.