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

Method drop

src/scope.rs:957–969  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

955 unsafe fn clone_as_waker(this: *const ()) -> RawWaker {
956 // SAFETY: `this` came from `Arc::into_raw` and the caller keeps a strong
957 // reference alive (per the contract), so incrementing the count for the
958 // cloned waker is sound.
959 unsafe { Arc::increment_strong_count(this.cast::<Self>()) };
960 RawWaker::new(this, &Self::VTABLE)
961 }
962
963 /// Queues self to be executed and consumes the waker.
964 ///
965 /// # Safety
966 ///
967 /// `this` must be a pointer produced by `Arc::into_raw` on an `Arc<Self>`.
968 ///
969 /// This call takes ownership of exactly one strong reference count for that
970 /// allocation, consuming it via `Arc::from_raw` internally. The caller must
971 /// hold "ownership" of one such strong reference.
972 unsafe fn wake(this: *const ()) {

Callers

nothing calls this directly

Calls 1

remove_referenceMethod · 0.80

Tested by

no test coverage detected