diff --git a/src/sched.c b/src/sched.c index 1138ae3..b36c159 100644 --- a/src/sched.c +++ b/src/sched.c @@ -262,7 +262,7 @@ sched_worker(void *arg) // Vol car aucune tâche trouvée for(int i = 0, k = rand() % (s->nthreads + 1), target; i < s->nthreads; ++i) { - target = (i + curr_th) % s->nthreads; + target = (i + k) % s->nthreads; if(s->bottom[target] != s->top[target]) { // Tâche trouvée