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

Method block_on

src/thread_pool.rs:695–704  ·  view source on GitHub ↗
(&'static self, future: F)

Source from the content-addressed store, hash-verified

693 //
694 // * If `Self` is `!Send`, its `Runnable` must be used and dropped on
695 // the original thread.
696 //
697 // The second clause of the `Spawn<M>::spawn` safety contract requires
698 // the caller to confine `scheduler` to the original thread, so
699 // `execute_runnable`, and by extension the `Runnable`, only
700 // ever run there.
701 //
702 // A `JobRef` has no `Drop` impl, so a `JobRef` that is never executed
703 // leaks its `Runnable` instead of dropping it. The `Runnable` is thus
704 // only ever dropped inside `execute_runnable` which, again, only runs
705 // on the correct original.
706 //
707 // * If `Self` is `!'static`, borrowed variables must outlive its

Callers 1

block_onFunction · 0.80

Calls 6

block_onFunction · 0.85
get_workerMethod · 0.80
new_latchMethod · 0.80
pollMethod · 0.80
wait_forMethod · 0.80
resetMethod · 0.80

Tested by

no test coverage detected