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

Method remove

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

Remove the task at `pos` (position in priority order: Critical first, then High, then Low). Used by the cancel handler after `iter().position(...)`.

(&mut self, pos: usize)

Source from the content-addressed store, hash-verified

149 ///
150 /// Used by the cancel handler after `iter().position(...)`.
151 pub fn remove(&mut self, pos: usize) {
152 let crit_len = self.critical.len();
153 let high_len = self.high.len();
154 if pos < crit_len {
155 self.critical.remove(pos);
156 } else if pos < crit_len + high_len {
157 self.high.remove(pos - crit_len);
158 } else {
159 self.low.remove(pos - crit_len - high_len);
160 }
161 }
162
163 /// Push a task back to the front of its priority tier.
164 ///

Callers 15

drain_completionsMethod · 0.45
fetch_fp32Method · 0.45
apply_user_aliasesFunction · 0.45
execute_aggregateMethod · 0.45
poll_write_batchMethod · 0.45
execute_purge_tenantMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected