()
| 996 | /// a count. |
| 997 | unsafe fn wake_by_ref(this: *const ()) { |
| 998 | // We use manually drop here to prevent us from consuming the arc on |
| 999 | // drop. This functions like an `&Arc<Self>` rather than an `Arc<Self>`. |
| 1000 | // |
| 1001 | // SAFETY: `this` came from `Arc::into_raw` and the caller keeps a strong |
| 1002 | // reference alive (per the contract). Wrapping in `ManuallyDrop` borrows |
| 1003 | // that count rather than consuming it. |
| 1004 | let this = |
| 1005 | unsafe { ManuallyDrop::new(Arc::from_raw(this.cast::<Self>())) }; |
| 1006 | |
| 1007 | // As in `wake`, this publishes no data of its own; it only needs the |
| 1008 | // READY -> WOKEN transition to be atomic. Hence, again, the `Relaxed` |
nothing calls this directly
no test coverage detected