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

Method scope

src/thread_pool.rs:724–729  ·  view source on GitHub ↗
(&'static self, f: F)

Source from the content-addressed store, hash-verified

722 // `execute_runnable`, and by extension the `Runnable`, only
723 // ever run there.
724 //
725 // A `JobRef` has no `Drop` impl, so a `JobRef` that is never executed
726 // leaks its `Runnable` instead of dropping it. The `Runnable` is thus
727 // only ever dropped inside `execute_runnable` which, again, only runs
728 // on the correct original.
729 //
730 // * If `Self` is `!'static`, borrowed variables must outlive its
731 // `Runnable`.
732 //

Callers 15

forteFunction · 0.80
forteFunction · 0.80
scopeFunction · 0.80
scope_emptyFunction · 0.80
scope_resultFunction · 0.80
scope_twoFunction · 0.80
scope_borrowFunction · 0.80
scope_borrow_twiceFunction · 0.80
scope_futureFunction · 0.80
scope_pending_futureFunction · 0.80
scope_sleeping_futureFunction · 0.80

Calls 2

with_scopeFunction · 0.85
with_workerMethod · 0.80

Tested by 12

scope_emptyFunction · 0.64
scope_resultFunction · 0.64
scope_twoFunction · 0.64
scope_borrowFunction · 0.64
scope_borrow_twiceFunction · 0.64
scope_futureFunction · 0.64
scope_pending_futureFunction · 0.64
scope_sleeping_futureFunction · 0.64
scope_nestingFunction · 0.64
scope_nesting_new_workerFunction · 0.64
scope_divide_and_conquerFunction · 0.64