Open ZLLentz opened 2 years ago
I wonder if we should track status objects and clean stale ones/their threads up somehow. Not a complete or well-thought out idea, of course. Concern just arises from long-running hutch-python sessions, and dangling resources are not great for that.
We might be able to check the previous status each time we want to replace it with a new one and mark the old status as failed. This, at the very least, puts a hard cap on the number of threads we can have at once.
I think that's a great - and easy - starting point.
Current Behavior
If the subscription status associated with a state move does not have an associated timeout, and the state never reaches the correct destination (or is never alerted as such by updates to the
state
signal, as whenstate
is anAttributeSignal
) then each such call tomove
orset
creates a new thread that is never cleaned up.Possible Solution
Some sort of enforced timeout? Some other sort of non-timeout failure state? Special handling for AttributeSignal?
Steps to Reproduce (for bugs)
AttributeSignal
as thestate
component (or, any signal that does not update)Context
XPP ran into this while manipulating their state shutter devices (xpp.devices)
Your Environment
xpp3 3/8/2022 (latest pcdsdevices, I think)