Skip to content

Commit

Permalink
Really fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkive committed Sep 29, 2018
1 parent df37b11 commit c81095a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/thread_pool.hpp
Expand Up @@ -85,8 +85,7 @@ void thread_pool::worker(W& work, F func)
{
// Note that fetch_add() returns the previous value.
// Thus, this returns zero for the first worker like it should.
std::atomic<unsigned int> index = counter_.fetch_add(1u,
std::memory_order::memory_order_relaxed);
unsigned int index = counter_.fetch_add(1u, std::memory_order::memory_order_relaxed);

while(index < work.size()) {
func(work[index]);
Expand Down

0 comments on commit c81095a

Please sign in to comment.