MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / front

Method front

nodedb/src/data/executor/core_loop/priority_queues.rs:113–121  ·  view source on GitHub ↗

Peek at the front task without removing it. Returns the highest-priority available task (Critical → High → Low). Used by `poll_write_batch` to decide whether to start a batch.

(&self)

Source from the content-addressed store, hash-verified

111 /// Returns the highest-priority available task (Critical → High → Low).
112 /// Used by `poll_write_batch` to decide whether to start a batch.
113 pub fn front(&self) -> Option<&ExecutionTask> {
114 if let Some(qt) = self.critical.front() {
115 return Some(&qt.task);
116 }
117 if let Some(qt) = self.high.front() {
118 return Some(&qt.task);
119 }
120 self.low.front().map(|qt| &qt.task)
121 }
122
123 /// Remove and return the highest-priority front task without applying the
124 /// drain ratio.

Callers 12

peekMethod · 0.80
poll_readyMethod · 0.80
pop_nextMethod · 0.80
record_atMethod · 0.80
admit_atMethod · 0.80
evict_oldMethod · 0.80
evict_oldMethod · 0.80
poll_write_batchMethod · 0.80
pushMethod · 0.80
earliest_lsnMethod · 0.80
drain_dueMethod · 0.80
next_retry_delayMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected