Skip to content

Commit

Permalink
Fix sliding_semaphore test
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed Feb 26, 2018
1 parent a3faea3 commit 9bc2134
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/unit/lcos/sliding_semaphore.cpp
Expand Up @@ -18,10 +18,9 @@
///////////////////////////////////////////////////////////////////////////////
std::atomic<int> count(0);

void worker(hpx::lcos::local::sliding_semaphore& sem, std::size_t i)
void worker(hpx::lcos::local::sliding_semaphore& sem)
{
++count;
sem.signal(i); // signal main thread
sem.signal(++count); // signal main thread
}

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -30,7 +29,7 @@ int hpx_main()
hpx::lcos::local::sliding_semaphore sem(9);

for (std::size_t i = 0; i != 10; ++i)
hpx::apply(&worker, std::ref(sem), i + 1);
hpx::apply(&worker, std::ref(sem));

// Wait for all threads to finish executing.
sem.wait(19);
Expand Down

0 comments on commit 9bc2134

Please sign in to comment.