From 9df1cba086319f72143cbaaeda47f27e836a71a2 Mon Sep 17 00:00:00 2001 From: Jayant Anand <97103177+jayant07-yb@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:39:00 +0530 Subject: [PATCH] All the workload was allocated only to one worker, added a fix for that (#464) Co-authored-by: Jayant Anand --- sources/worker_pool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/worker_pool.h b/sources/worker_pool.h index 651a3940..485de314 100644 --- a/sources/worker_pool.h +++ b/sources/worker_pool.h @@ -80,7 +80,7 @@ static inline void od_worker_pool_feed(od_worker_pool_t *pool, while (1) { oldValue = od_atomic_u32_of(&pool->round_robin); - next = oldValue + 1 == pool->count ? 0 : oldValue; + next = oldValue + 1 == pool->count ? 0 : oldValue + 1; if (od_atomic_u32_cas(&pool->round_robin, oldValue, next) == oldValue)