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

Method add_reference

src/scope.rs:302–304  ·  view source on GitHub ↗

Adds an additional reference to the scope's reference counter. Every call to this should have a matching call to `Scope::remove_reference`, or the scope will block forever on completion.

(&self)

Source from the content-addressed store, hash-verified

300 // to `remove_reference()`. Each job holds its increment until
301 // after it has called `func` and dropped its `Arc` handle, so
302 // neither the `Scope` nor anything `f` borrows can be freed
303 // while a job might still use (or drop) them.
304 //
305 // * If `op` is `!Send` then `JobRef::execute` will only be called
306 // on this thread.
307 //

Callers 1

newMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected