Returns the worker to the pool with the vm still alive; the session state stays on the handle so the vm can be resumed on a later claim.
(self, pool: &VmWorkerPool)
| 389 | /// Returns the worker to the pool with the vm still alive; the session |
| 390 | /// state stays on the handle so the vm can be resumed on a later claim. |
| 391 | pub fn return_idle(self, pool: &VmWorkerPool) { |
| 392 | debug_assert!( |
| 393 | matches!(&self.worker.session_state, Some(s) if s.guild_id == self.guild_id), |
| 394 | "idle return without session state on the handle" |
| 395 | ); |
| 396 | pool.return_worker(self.worker, false); |
| 397 | } |
| 398 | |
| 399 | /// Returns the worker to the pool after its vm shut down, clearing the |
| 400 | /// session state so a later claim doesn't try to resume a dead vm. |
no test coverage detected