feat(managed): add unified Tokio managed task

This commit is contained in:
Nils Andreas Svee committed 2026-08-04 20:38:52 +07:00
1 parent 49b34bf85c
commit fd3c29e63a
9 files changed
+1720 -76

No files matched your search

+15
View File
@@ -71,6 +71,16 @@ impl PendingMap {
self.map.len()
}
#[cfg(feature = "tokio")]
pub fn next_timeout_deadline(&self) -> Option<Instant> {
self.map.values().map(|probe| probe.timeout_at).min()
}
#[cfg(feature = "tokio")]
pub fn latest_timeout_deadline(&self) -> Option<Instant> {
self.map.values().map(|probe| probe.timeout_at).max()
}
#[cfg(test)]
pub fn contains(&self, wire_seq: u32) -> bool {
self.map.contains_key(&wire_seq)
@@ -139,6 +149,11 @@ impl TimedOutMap {
self.map.len()
}
#[cfg(feature = "tokio")]
pub fn latest_timeout_deadline(&self) -> Option<Instant> {
self.map.values().map(|probe| probe.timeout_at).max()
}
#[cfg(test)]
pub fn contains(&self, wire_seq: u32) -> bool {
self.map.contains_key(&wire_seq)