From 6ca39f7415341512adc2327745cf9b8af30982a2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 11 Dec 2014 15:57:41 +0800 Subject: [PATCH] management/scheduler: improve periodic timing precision --- artiq/management/scheduler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/management/scheduler.py b/artiq/management/scheduler.py index 81ec8fb12..25f28dcee 100644 --- a/artiq/management/scheduler.py +++ b/artiq/management/scheduler.py @@ -98,8 +98,8 @@ class Scheduler: @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 @@ class Scheduler: 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)