Exemple #1
0
void worker(std::size_t i, data& d, hpx::lcos::local::counting_semaphore& sem)
{
    d.init.wait();
    hpx::cout << d.msg << ": " << i << "\n" << hpx::flush;
    sem.signal();                   // signal main thread
}
void worker(hpx::lcos::local::counting_semaphore& sem)
{
    sem.signal();   // signal main thread
    ++count;
}