Commit 63d2496f authored by Sebastian Woelke's avatar Sebastian Woelke

print successfully stealing attempts

parent b1340ea2
...@@ -281,10 +281,11 @@ public: ...@@ -281,10 +281,11 @@ public:
} }
auto& wmatrix = wdata.worker_matrix; auto& wmatrix = wdata.worker_matrix;
auto& scheduler_lvl = wmatrix[scheduler_lvl_idx]; auto& scheduler_lvl = wmatrix[scheduler_lvl_idx];
auto res = auto& w = scheduler_lvl[wdata.uniform(wdata.rengine) % scheduler_lvl.size()];
scheduler_lvl[wdata.uniform(wdata.rengine) % scheduler_lvl.size()] auto res = w->data().queue.take_tail();
->data() if (res) {
.queue.take_tail(); std::cout << "steal: me: " << self->to_string() << " from: " << w->to_string() << std::endl;
}
++steal_cnt; ++steal_cnt;
if (steal_cnt >= scheduler_lvl.size()) { if (steal_cnt >= scheduler_lvl.size()) {
steal_cnt = 0; steal_cnt = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment