MCPcopy Index your code
hub / github.com/encounter/objdiff / push_once

Method push_once

objdiff-core/src/jobs/mod.rs:45–49  ·  view source on GitHub ↗
(&mut self, job: Job, func: impl FnOnce() -> JobState)

Source from the content-addressed store, hash-verified

43 /// Adds a job to the queue if a job of the given kind is not already running.
44 #[inline]
45 pub fn push_once(&mut self, job: Job, func: impl FnOnce() -> JobState) {
46 if !self.is_running(job) {
47 self.push(func());
48 }
49 }
50
51 /// Returns whether a job of the given kind is running.
52 pub fn is_running(&self, kind: Job) -> bool {

Callers 5

start_create_scratchFunction · 0.80
start_buildFunction · 0.80
start_check_updateFunction · 0.80
start_updateFunction · 0.80
reloadMethod · 0.80

Calls 2

is_runningMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected