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

Method yield_local

src/thread_pool.rs:1462–1472  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1460 // * If the closure is `!Send`, `JobRef::execute` only runs on this
1461 // thread. The closure is `Send`, so this obligation is vacuous.
1462 let batch_job_ref = unsafe { batch_job.into_job_ref() };
1463 // Push the batch job into the steal queue so siblings can steal it.
1464 if let Err(job_ref) = self.sharing_queue().push(batch_job_ref) {
1465 // If the queue is full, that indicates that the pool is
1466 // probably under high-load and we should continue local-first
1467 // operation.
1468 //
1469 // This just adds the jobs back to the local queue.
1470 self.execute(job_ref, false);
1471 } else {
1472 shared_job = true;
1473 }
1474 }
1475

Callers 1

activateMethod · 0.80

Calls 2

find_local_workMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected