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

Method push_front

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

Push a task back to the front of its priority tier. Used by `poll_write_batch` to return tasks that could not be batched. The task is re-inserted at the *front* of its tier so it is the next candidate for that tier.

(&mut self, task: ExecutionTask)

Source from the content-addressed store, hash-verified

166 /// The task is re-inserted at the *front* of its tier so it is the next
167 /// candidate for that tier.
168 pub fn push_front(&mut self, task: ExecutionTask) {
169 let queued = QueuedTask::new(task);
170 match queued.task.request.priority {
171 Priority::Critical => self.critical.push_front(queued),
172 Priority::High => self.high.push_front(queued),
173 Priority::Normal | Priority::Background => self.low.push_front(queued),
174 }
175 }
176
177 /// Pop the next task according to the 8:4:2 drain ratio.
178 ///

Callers 2

try_join_onceFunction · 0.80
poll_write_batchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected