Waits for the scope to complete. # Safety The caller must ensure that this is called at most once.
(&self, worker: &Worker)
| 403 | // the heap-allocated error will be visible to the reader. |
| 404 | // |
| 405 | // If the write fails, another panic must have already occurred, and |
| 406 | // we don't need to synchronize memory (the previous call to |
| 407 | // `store_panic` handles the synchronization for it's panic data). |
| 408 | if self |
| 409 | .panic |
| 410 | .compare_exchange( |
| 411 | nil, |
| 412 | err_ptr, |
| 413 | Ordering::Release, |
| 414 | Ordering::Relaxed, |
| 415 | ) |
| 416 | .is_err() |
| 417 | { |
| 418 | // Another panic raced in ahead of us, so we need to drop this |
| 419 | // error. Dropping the payload may itself panic, but this will |
| 420 | // trigger the abort guard instead of unwinding. |
| 421 | // |
no test coverage detected