hpx/lcos_local/composable_guard.hpp

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

namespace hpx
namespace lcos
namespace local

Functions

void run_guarded(guard &guard, detail::guard_function task)

Conceptually, a guard acts like a mutex on an asynchronous task. The mutex is locked before the task runs, and unlocked afterwards.

template<typename F, typename ...Args>
void run_guarded(guard &guard, F &&f, Args&&... args)
void run_guarded(guard_set &guards, detail::guard_function task)

Conceptually, a guard_set acts like a set of mutexes on an asynchronous task. The mutexes are locked before the task runs, and unlocked afterwards.

template<typename F, typename ...Args>
void run_guarded(guard_set &guards, F &&f, Args&&... args)
class guard : public hpx::lcos::local::detail::debug_object

Public Functions

guard()
~guard()

Public Members

detail::guard_atomic task
class guard_set : public hpx::lcos::local::detail::debug_object

Public Functions

guard_set()
~guard_set()
std::shared_ptr<guard> get(std::size_t i)
void add(std::shared_ptr<guard> const &guard_ptr)
std::size_t size()

Private Functions

void sort()

Private Members

std::vector<std::shared_ptr<guard>> guards
bool sorted

Friends

void run_guarded(guard_set &guards, detail::guard_function task)

Conceptually, a guard_set acts like a set of mutexes on an asynchronous task. The mutexes are locked before the task runs, and unlocked afterwards.