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

Function scope_sleeping_future

src/scope.rs:1155–1172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1153 // ownership of one strong count (per the contract), so decrementing it
1154 // is sound.
1155 unsafe { Arc::decrement_strong_count(this.cast::<Self>()) };
1156 }
1157}
1158
1159// -----------------------------------------------------------------------------
1160// Scope pointer
1161
1162mod scope_ptr {
1163 //! Defines a "lifetime-erased" reference-counting pointer to a scope.
1164
1165 use alloc::boxed::Box;
1166 use core::any::Any;
1167
1168 use super::Scope;
1169
1170 /// A reference-counted pointer to a scope. Used to capture a scope pointer
1171 /// in jobs without faking a lifetime. Holding a `ScopePtr` keeps the
1172 /// reference scope from being deallocated.
1173 pub struct ScopePtr<'scope, 'env>(*const Scope<'scope, 'env>);
1174
1175 // SAFETY: Sending the `*const Scope` is sound because the pointee outlives

Callers

nothing calls this directly

Calls 4

resize_to_availableMethod · 0.80
scopeMethod · 0.80
depopulateMethod · 0.80
spawnMethod · 0.45

Tested by

no test coverage detected