hpx/synchronization/counting_semaphore.hpp

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx

Typedefs

template<std::ptrdiff_t LeastMaxValue = PTRDIFF_MAX>
using counting_semaphore = detail::counting_semaphore<LeastMaxValue>
using binary_semaphore = detail::binary_semaphore<>
template<typename Mutex = hpx::spinlock, int N = 0>
class counting_semaphore_var : private hpx::detail::counting_semaphore<PTRDIFF_MAX, hpx::spinlock>

Public Functions

counting_semaphore_var(std::ptrdiff_t value = N)
counting_semaphore_var(counting_semaphore_var const&)
counting_semaphore_var &operator=(counting_semaphore_var const&)
void wait(std::ptrdiff_t count = 1)
bool try_wait(std::ptrdiff_t count = 1)
void signal(std::ptrdiff_t count = 1)

Signal the semaphore.

std::ptrdiff_t signal_all()

Private Types

template<>
using mutex_type = Mutex