Runs an operation on multiple threads without waiting for results. When executed on a thread that is currently registered as a worker (i.e. the closure inside [`Membership::activate`], [`ThreadPool::with_worker`], or similar) this is able to look up that registration and find the worker and thread-pool implicitly. If not called within a thread pool, this uses the [`DEFAULT_POOL`]. If you have a
(f: F)
| 2476 | }; |
| 2477 | |
| 2478 | // SAFETY: `op` cannot unwind. All user code is wrapped in |
| 2479 | // `halt_unwinding` and `handle_panic` does not unwind. |
| 2480 | let job = unsafe { HeapJob::new(op) }; |
| 2481 | |
| 2482 | // SAFETY: `HeapJob::into_job_ref` has two preconditions: |
| 2483 | // |
| 2484 | // * The `JobRef` must not outlive any of the items closed over by |
| 2485 | // `op`. |
| 2486 | // |
| 2487 | // `op` owns an `Arc<F>` clone (`func`). Since `F: 'static`, that |
| 2488 | // `Arc` and everything it keeps alive is itself `'static`, |
| 2489 | // so it outlives the `JobRef` regardless of when the job runs. |
nothing calls this directly
no test coverage detected