diff --git a/rs/moq-net/src/lite/subscriber.rs b/rs/moq-net/src/lite/subscriber.rs index 5c3418b711f..6c7e628deec 100644 --- a/rs/moq-net/src/lite/subscriber.rs +++ b/rs/moq-net/src/lite/subscriber.rs @@ -13,6 +13,7 @@ use crate::{ coding::{Decode as _, Reader, Stream}, lite, track::{Anchor, Position, Subscription}, + util::SendCell, }; use super::Version; @@ -178,10 +179,13 @@ struct TrackEntry { /// Where the subscription's groups go, once its TRACK_INFO says how to read them. A /// SUBSCRIBE sent alongside its TRACK registers before. copy: Option, + // Parked and paused groups hold group and frame writers, which reach the whole track + // model: the cells prove `Send` once here, so the session driver's proof stays within + // the default recursion limit. /// The group streams that arrived before the copy, while any wait. - parked: Option>, + parked: Option>>, /// Lite-07: the groups a YIELDED reset paused, once one did or a stream waits on one. - paused: Option>, + paused: Option>>, /// Lite-07: the groups a stream that a YIELDED reset would pause is reading, one per /// stream, so stream credit bounds them. yielding: BTreeMap, diff --git a/rs/moq-net/src/util/cell.rs b/rs/moq-net/src/util/cell.rs index 0c5601835a4..a53710a953b 100644 --- a/rs/moq-net/src/util/cell.rs +++ b/rs/moq-net/src/util/cell.rs @@ -28,7 +28,13 @@ impl SendCell { } } -// SAFETY: the only constructor requires T: Send + Sync. The private +impl Default for SendCell { + fn default() -> Self { + Self(T::default()) + } +} + +// SAFETY: both constructors require T: Send + Sync. The private // field cannot be replaced with another type; cloning preserves T's bounds. unsafe impl Send for SendCell {}