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

Function scope_borrow

src/scope.rs:1048–1061  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1046 this.scope_ptr.store_panic(err);
1047 // Drop the future here, on its confined thread; see the Ready
1048 // branch.
1049 //
1050 // SAFETY: The LOCKED state gives us exclusive access.
1051 unsafe { ManuallyDrop::drop(&mut *this.future.get()) };
1052 drop(this);
1053 }
1054 }
1055 core::mem::forget(abort_guard);
1056
1057 // In the branches above where the task is dropped (rather than
1058 // converted into a job-ref and queued), the drop decrements the
1059 // reference count, freeing the task if no wakers for it are being
1060 // held.
1061 //
1062 // I view this as preferable to the alternative: if no wakers are held
1063 // for the task, the task will never wake and the scope will wait for
1064 // its latch indefinitely, and deadlock.

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