Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  15 Aug 2024, Scott Oser, Forum, "Safe" abort of sequencer scripts 
    Reply  19 Aug 2024, Stefan Ritt, Forum, "Safe" abort of sequencer scripts 
       Reply  22 Aug 2024, Scott Oser, Forum, "Safe" abort of sequencer scripts 
    Reply  11 Sep 2024, Konstantin Olchanski, Forum, "Safe" abort of sequencer scripts 
Message ID: 2838     Entry time: 11 Sep 2024     In reply to: 2804
Author: Konstantin Olchanski 
Topic: Forum 
Subject: "Safe" abort of sequencer scripts 
> We often use the MIDAS sequencer to temporarily control detector settings, such as:
> 
> * <change some setting>
> * WAIT 60 seconds
> * <revert setting to original value>
> 
> The question arises of what happens if the sequencer scripts gets aborted during that wait, preventing the value from being reset.

Common problem. Go have an elegant solution using the "defer" keyword.

https://go.dev/tour/flowcontrol/12

K.O.
ELOG V3.1.4-2e1708b5