| 693 | // sound to call `execute_runnable` on `job_pointer`. This requires: |
| 694 | // |
| 695 | // * That `job_pointer` was produced by `Runnable::into_raw` and not |
| 696 | // yet consumed by `Runnable::from_raw`. We produced it with |
| 697 | // `into_raw` immediately above. The only call to `from_raw` is |
| 698 | // inside `execute_runnable`, which runs at most once because |
| 699 | // `JobRef::execute` consumes the `JobRef`. |
| 700 | // |
| 701 | // * If the future is `!Send`, `execute_runnable` is only called on |
| 702 | // the thread the future was spawned on. |
| 703 | // |
| 704 | // The second clause of the `Spawn<M>::spawn` safety contract |
| 705 | // requires the caller to ensure this. |
| 706 | let job_ref = unsafe { JobRef::new(job_pointer, execute_runnable) }; |
| 707 | |