From ecda94705ebeaf3202451aef4ad0b17e3bb0faf5 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 21 Jul 2016 16:42:09 +0200 Subject: [PATCH] doc/management_system: point out check_pause() (closes #522) --- doc/manual/management_system.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/manual/management_system.rst b/doc/manual/management_system.rst index 613c064bf..d247ea7c6 100644 --- a/doc/manual/management_system.rst +++ b/doc/manual/management_system.rst @@ -65,7 +65,10 @@ When determining what experiment to begin executing next (i.e. entering the prep Pauses ------ -In the run stage, an experiment may yield to the scheduler by calling the ``pause`` method. If there are other experiments with higher priority (e.g. a high-priority timed experiment has reached its due date), they are preemptively executed, and then the ``pause`` method returns. Otherwise, the ``pause`` method returns immediately. +In the run stage, an experiment may yield to the scheduler by calling the ``pause()`` method of the scheduler. +If there are other experiments with higher priority (e.g. a high-priority timed experiment has reached its due date), they are preemptively executed, and then ``pause()`` returns. +Otherwise, ``pause()`` returns immediately. +To check whether ``pause()`` would in fact *not* return immediately, use :meth:`artiq.master.scheduler.Scheduler.check_pause`. The experiment must place the hardware in a safe state and disconnect from the core device (typically, by using ``self.core.comm.close()``) before calling ``pause``.