This adds a guard to streams that automatically issues a STOP once dropped.
Implementing this required a rather major change to the implementation, namely wrapping the internal state into Arc/Mutex/atomics to make Lighthouse cloneable, since the stop guard requires keeping a reference to the Lighthouse alive (dynamically). This refactoring is implemented in the lh-shared-state branch, which this PR is based upon.
This adds a guard to streams that automatically issues a
STOP
once dropped.Implementing this required a rather major change to the implementation, namely wrapping the internal state into
Arc
/Mutex
/atomics to makeLighthouse
cloneable, since the stop guard requires keeping a reference to theLighthouse
alive (dynamically). This refactoring is implemented in thelh-shared-state
branch, which this PR is based upon.