diff --git a/app/playground/main.cpp b/app/playground/main.cpp index d3a7a50..cde3abd 100644 --- a/app/playground/main.cpp +++ b/app/playground/main.cpp @@ -7,8 +7,7 @@ #include #include -#include -#include +#include int main() { diff --git a/lib/pls/src/internal/scheduling/scheduler.cpp b/lib/pls/src/internal/scheduling/scheduler.cpp index 7f725b2..4a36132 100644 --- a/lib/pls/src/internal/scheduling/scheduler.cpp +++ b/lib/pls/src/internal/scheduling/scheduler.cpp @@ -100,9 +100,7 @@ task *scheduler::steal_task() { size_t target = (offset + i) % num_threads(); // Skip our self for stealing - if (target == my_id) { - continue; - } + target = ((target == my_id) + target) % num_threads(); auto target_state = thread_state_for(target); // TODO: See if we should re-try popping if it failed due to contention