Skip to content

Commit

Permalink
Merge pull request #3199 from STEllAR-GROUP/msimberg-patch-2
Browse files Browse the repository at this point in the history
Fix sliding_semaphore test
  • Loading branch information
msimberg committed Feb 27, 2018
2 parents 9f44bb4 + 9bc2134 commit 8c0d176
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 8c0d176

Please sign in to comment.