()
| 1092 | /// hold "ownership" of one such strong reference. |
| 1093 | unsafe fn wake(this: *const ()) { |
| 1094 | // SAFETY: `this` came from `Arc::into_raw` and the caller transfers |
| 1095 | // ownership of one strong count (per the contract), so `from_raw` may |
| 1096 | // reclaim it. |
| 1097 | let this = unsafe { Arc::from_raw(this.cast::<Self>()) }; |
| 1098 | |
| 1099 | // This wake publishes no data of its own; it only needs the READY -> |
| 1100 | // WOKEN transition to be atomic so exactly one waker enqueues the job. |
| 1101 | // Hence the `Relaxed` ordering. The future's state is ordered by the |
| 1102 | // poll's `Release` store and the enqueue/dequeue handoff, not by this |
| 1103 | // swap. |
| 1104 | if this.state.swap(WOKEN, Ordering::Relaxed) == READY { |
| 1105 | Worker::with_current(|worker| this.schedule(worker)); |
| 1106 | } |
| 1107 | } |
| 1108 | |
| 1109 | /// Queues self to be executed without consuming the waker. |
| 1110 | /// |
nothing calls this directly
no test coverage detected