MCPcopy Create free account
hub / github.com/BabitMF/bmf / remove_node_task

Method remove_node_task

bmf/engine/c_engine/src/scheduler_queue.cpp:66–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66int SchedulerQueue::remove_node_task(int node_id) {
67 std::lock_guard<std::mutex> guard(con_var_mutex_);
68 SafePriorityQueue<Item> temp_queue;
69 while (!queue_.empty()) {
70 Item item;
71 queue_.pop(item);
72 if (item.task.node_id_ != node_id) {
73 temp_queue.push(item);
74 }
75 }
76 while (!temp_queue.empty()) {
77 Item item;
78 temp_queue.pop(item);
79 queue_.push(item);
80 }
81 return 0;
82}
83
84int SchedulerQueue::exec_loop() {
85 while (true) {

Callers 1

clear_taskMethod · 0.80

Calls 3

emptyMethod · 0.45
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected