hpx/execution/algorithms/run_loop.hpp#

Defined in header hpx/execution/algorithms/run_loop.hpp.

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

namespace hpx
namespace execution
namespace experimental

Typedefs

using run_loop_scheduler = run_loop::run_loop_scheduler#
class run_loop#

Public Functions

inline run_loop() noexcept#
run_loop(run_loop const&) = delete#
run_loop(run_loop&&) = delete#
run_loop &operator=(run_loop const&) = delete#
run_loop &operator=(run_loop&&) = delete#
inline ~run_loop()#
inline run_loop_scheduler get_scheduler()#
inline void run()#
template<typename Pred>
inline void run_until(Pred &&condition)#

Internal HPX extension: runs the loop until the predicate is satisfied. Not part of the C++20 [exec.run_loop] specification.

inline void complete_operation(bool &flag)#

Internal HPX extension: safely signals completion of an operation and wakes waiting threads.

inline void finish()#

Private Functions

inline void push_back(run_loop_opstate_base *t)#
inline run_loop_opstate_base *pop_front()#

Private Members

hpx::intrusive_ptr<detail::run_loop_data> mtx#
hpx::lcos::local::detail::condition_variable cond_var#
run_loop_opstate_base head#
bool stop = false#
std::atomic<std::size_t> active_threads = {0}#

Friends

friend struct run_loop_scheduler::run_loop_sender
struct env_t#

Subclassed by hpx::execution::experimental::run_loop::run_loop_scheduler

Public Functions

inline auto query(get_completion_scheduler_t<set_value_t>) const noexcept#
inline auto query(get_completion_scheduler_t<set_stopped_t>) const noexcept#

Public Members

run_loop *loop#

Public Static Functions

template<typename CPO>
static auto query(get_completion_domain_t<CPO>) noexcept -> detail::sync_wait_domain#
template<typename Receiver>
struct run_loop_opstate : public hpx::execution::experimental::run_loop::run_loop_opstate_base#

Public Functions

template<typename Receiver_>
inline run_loop_opstate(run_loop_opstate_base *tail, run_loop *loop, Receiver_ &&receiver) noexcept(noexcept(std::is_nothrow_constructible_v<std::decay_t<Receiver>, Receiver_>))#
inline run_loop_opstate(run_loop_opstate_base *next, run_loop *loop, Receiver r)#
inline void start() & noexcept#

Public Members

run_loop *loop#
HPX_NO_UNIQUE_ADDRESS std::decay_t< Receiver > receiver

Public Static Functions

static inline void execute(run_loop_opstate_base *p) noexcept#
struct run_loop_opstate_base#

Public Functions

inline explicit run_loop_opstate_base(run_loop_opstate_base *tail) noexcept#
inline run_loop_opstate_base(run_loop_opstate_base *tail, void (*execute)(run_loop_opstate_base*) noexcept) noexcept#
run_loop_opstate_base(run_loop_opstate_base const&) = delete#
run_loop_opstate_base(run_loop_opstate_base&&) = delete#
run_loop_opstate_base &operator=(run_loop_opstate_base const&) = delete#
run_loop_opstate_base &operator=(run_loop_opstate_base&&) = delete#
~run_loop_opstate_base() = default#
inline void execute() noexcept#

Public Members

run_loop_opstate_base *next#
void (*execute_)(run_loop_opstate_base*) noexcept#
run_loop_opstate_base *tail#
union hpx::execution::experimental::run_loop::run_loop_opstate_base::[anonymous] [anonymous]#
class run_loop_scheduler : public hpx::execution::experimental::run_loop::env_t#

Public Functions

inline explicit run_loop_scheduler(run_loop *loop) noexcept#
inline run_loop &get_run_loop() const noexcept#
inline run_loop_sender schedule() const noexcept#
template<typename Sender, typename Allocator = hpx::util::internal_allocator<>>
auto query(make_future_t, Sender &&sender, Allocator const &allocator = Allocator{}) const#

Public Members

friend run_loop

Public Static Functions

static inline constexpr auto query(get_forward_progress_guarantee_t) noexcept#

Friends

inline friend constexpr friend bool operator== (run_loop_scheduler const &lhs, run_loop_scheduler const &rhs) noexcept
inline friend constexpr friend bool operator!= (run_loop_scheduler const &lhs, run_loop_scheduler const &rhs) noexcept
struct run_loop_sender#

Public Types

using sender_concept = hpx::execution::experimental::sender_t#

Public Functions

template<typename Receiver>
inline run_loop_opstate<Receiver> connect(Receiver &&receiver) const noexcept#
inline constexpr env_t get_env() const noexcept#

Public Static Functions

template<typename ReceiverEnv>
static inline consteval auto get_completion_signatures() noexcept#

Private Functions

inline explicit constexpr run_loop_sender(run_loop *loop) noexcept#

Private Members

friend run_loop_scheduler
run_loop *loop#