Waits for the scope to complete. # Safety The caller must ensure that this is called at most once.
(&self, worker: &Worker)
| 403 | err_ptr, |
| 404 | Ordering::Release, |
| 405 | Ordering::Relaxed, |
| 406 | ) |
| 407 | .is_err() |
| 408 | { |
| 409 | // Another panic raced in ahead of us, so we need to drop this |
| 410 | // error. Dropping the payload may itself panic, but this will |
| 411 | // trigger the abort guard instead of unwinding. |
| 412 | // |
| 413 | // SAFETY: This was created by `Box::into_raw` just above. |
| 414 | let err = unsafe { Box::from_raw(err_ptr) }; |
| 415 | drop(err); |
| 416 | } |
| 417 | } else { |
| 418 | // A panic is already stored, so this payload is dropped. Dropping |
| 419 | // it may itself panic, but this will trigger the abort guard |
| 420 | // instead of unwinding. |
| 421 | drop(err); |
no test coverage detected