MCPcopy Create free account
hub / github.com/NthTensor/Forte / scope_empty

Function scope_empty

src/scope.rs:998–1005  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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`

Callers

nothing calls this directly

Calls 3

resize_to_availableMethod · 0.80
scopeMethod · 0.80
depopulateMethod · 0.80

Tested by

no test coverage detected