ProjectLighthouseCAU / lighthouse-rust

Rust SDK for Project Lighthouse
https://docs.rs/lighthouse-client
MIT License
2 stars 1 forks source link

Stop streams automatically once dropped #14

Open fwcd opened 1 month ago

fwcd commented 1 month ago

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.