Inject `val` into the first `WaitingHostCall` waiter and mark it Ready; false if none. Uncorrelated path for hosts/tests that don't track call ids. */
(&mut self, val: Val)
| 83 | |
| 84 | /* Inject `val` into the first `WaitingHostCall` waiter and mark it Ready; false if none. Uncorrelated path for hosts/tests that don't track call ids. */ |
| 85 | pub fn inject_host_result(&mut self, val: Val) -> bool { |
| 86 | match self.scheduler.iter().position(|h| matches!(h.state, CoroState::WaitingHostCall(_))) { |
| 87 | Some(idx) => { self.deliver_host_result(idx, val); true } |
| 88 | None => false, |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | /* Inject `val` into the `WaitingHostCall(id)` waiter and mark it Ready; false if no coro is parked on `id`. Lets the host resolve concurrent calls out of order. */ |
| 93 | pub fn inject_host_result_by_id(&mut self, id: u64, val: Val) -> bool { |
no test coverage detected