Skip to content

Commit dda9e3d

Browse files
committed
Use memory_order_relaxed for in_flight addition.
1 parent 1e79db9 commit dda9e3d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ThreadPool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ auto ThreadPool::enqueue(F&& f, Args&&... args)
164164
tasks.emplace([task](){ (*task)(); });
165165
std::atomic_fetch_add_explicit(&in_flight,
166166
std::size_t(1),
167-
std::memory_order_acq_rel);
167+
std::memory_order_relaxed);
168168
condition_consumers.notify_one();
169169

170170
return res;

0 commit comments

Comments
 (0)