Open prjemian opened 1 year ago
This question was answered as an apstools issue comment. Post this question and answer as a FAQ:
Q: Is there a suspender to stop RE and return to idle?
A: A suspender is not used for this. A bluesky suspender watches a signal and suspends Msg
processing by the RunEngine. The user can choose to change the RunEngine's state at that time. Processing resumes when the signal becomes valid again.
There are two RunEngine methods of particular interest:
method | description |
---|---|
RunEngine.request_pause |
Command the Run Engine to pause. |
RunEngine.request_suspend |
Request that the run suspend itself until the future is finished. |
Neither of these return the RunEngine to idle.
If you absolutely must stop the RunEngine
from within a plan, yet do it gracefully, abort_run_engine_to_idle()
is the plan for you. See the notebook for its definition.
You are cautioned against the general use of this plan. We choose not to include it directly in the apstools
library.
Given the number of related issues, this topic might benefit from both a FAQ and a document.
Is there a suspender that will stop the RE and immediately return to idle?