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

Method wait_for

src/thread_pool.rs:1358–1373  ·  view source on GitHub ↗
(&self, latch: &Latch)

Source from the content-addressed store, hash-verified

1356 /// a job that polls the future).
1357 pub(crate) nonsend_fifo_queue: Arc<SegQueue<JobRef>>,
1358 /// A local psudorandom number-generator. Used to spread out
1359 /// worker-to-worker operations evenly across the pool.
1360 rng: XorShift64Star,
1361 /// The CPU tick when work was last promoted from local to shared. This has
1362 /// no absolute relation to time.
1363 last_promote_tick: Cell<u64>,
1364 /// The tick of the last `join` entered while this worker's `join` queue was
1365 /// empty, used to share more of the queued work the longer it has been
1366 /// building up.
1367 join_start: Cell<u64>,
1368 /// Whether [`Worker::first_in_tree`] has been called since the current
1369 /// tree of joins started.
1370 tree_seen: Cell<bool>,
1371 /// The tick until which this worker searches for work instead of parking
1372 /// when it runs out (see [`Worker::search_until`]).
1373 search_until: Cell<u64>,
1374 /// [`time::HEARTBEAT`] in ticks.
1375 heartbeat_ticks: u64,
1376 /// [`Worker::SPIN_DURATION`] in ticks.

Callers 4

block_onMethod · 0.80
joinMethod · 0.80
broadcastMethod · 0.80
completeMethod · 0.80

Calls 3

checkMethod · 0.80
yield_nowMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected