(&self, from_id: usize, input: D)
| 546 | } |
| 547 | |
| 548 | pub fn add_new(&self, from_id: usize, input: D) -> u64 { |
| 549 | let id = GLOBAL_ID.fetch_add(1, std::sync::atomic::Ordering::AcqRel); |
| 550 | let input = Arc::new(input); |
| 551 | for (i, entry) in self.new.iter().enumerate() { |
| 552 | if i != from_id { |
| 553 | entry.lock().unwrap().push((id, input.clone())); |
| 554 | } |
| 555 | } |
| 556 | id |
| 557 | } |
| 558 | |
| 559 | pub fn add_for_main(&self, _from_id: usize, input: D) -> u64 { |
| 560 | let id = GLOBAL_ID.fetch_add(1, std::sync::atomic::Ordering::AcqRel); |
no test coverage detected