Skip to content

Commit

Permalink
management/scheduler: improve periodic timing precision
Browse files Browse the repository at this point in the history
sbourdeauducq committed Dec 11, 2014
1 parent d315268 commit 6ca39f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions artiq/management/scheduler.py
Original file line number Diff line number Diff line change
@@ -98,8 +98,8 @@ def _run_periodic(self):

@asyncio.coroutine
def _schedule(self):
next_periodic = yield from self._run_periodic()
while True:
next_periodic = yield from self._run_periodic()
ev_queue = asyncio.Task(self.queue_count.acquire())
ev_periodic = asyncio.Task(self.periodic_modified.wait())
done, pend = yield from asyncio.wait(
@@ -109,7 +109,7 @@ def _schedule(self):
for t in pend:
t.cancel()

next_periodic = yield from self._run_periodic()
yield from self._run_periodic()
if ev_queue in done:
rid, run_params, timeout = self.queued.pop(0)
result = yield from self._run(rid, run_params, timeout)

0 comments on commit 6ca39f7

Please sign in to comment.