Cleaning up at exit
We need to find a way to do some 'cleanup' if there are some greenlets still running when Python interpreter closes:
- stopping all motors motion
- stopping scans
- in the future, stopping all counting counters
- etc.
The problem is essentially for greenlets started in the background (like doing .jog
on a motor,
or doing a .move
with wait=False
, or any user-started greenlet with .spawn
).