Use rayon to speed up subscribe message serializing

This commit is contained in:
James Wilson
2021-08-06 17:42:03 +01:00
parent 0788270756
commit 74cf55174e
8 changed files with 49 additions and 25 deletions
+4
View File
@@ -49,6 +49,10 @@ where
self.add_with(|_| item)
}
pub fn as_slice(&self) -> &[Option<T>] {
&self.items
}
pub fn add_with<F>(&mut self, f: F) -> Id
where
F: FnOnce(Id) -> T,