(&'static self, job_ref: JobRef)
| 198 | } |
| 199 | } |
| 200 | |
| 201 | /// Registers a callback to be invoked (via [`handle_panic`]) with the |
| 202 | /// payload of panics that have nowhere to propagate, such as panics from |
| 203 | /// closures or futures passed to [`spawn`]. This replaces any previously |
| 204 | /// registered handler. |
| 205 | /// |
| 206 | /// If no handler is registered, such panics abort the process. |
| 207 | /// |
| 208 | /// The handler must not panic; if it does, the process aborts. |
| 209 | /// |
| 210 | /// [`handle_panic`]: ThreadPool::handle_panic |
| 211 | /// [`spawn`]: ThreadPool::spawn |
| 212 | pub fn set_panic_handler<H>(&self, handler: H) |
no test coverage detected