46 : threadid(
std::this_thread::get_id()), trampolineid(trampoline) {}
49 template <
class E = std::exception_ptr>
52 template <
class E = std::exception_ptr>
74 template <
class E = std::exception_ptr>
89 remove_cvref_t<SingleReceiver>,
110 return std::get<0>(p);
114 return std::get<1>(p);
118 return std::get<2>(p);
127 return owner() !=
nullptr;
130 template <
class Selector,
class Derived>
139 (
requires not Same<SingleReceiver, recurse_t>)
142 SingleReceiver awhat) {
150 if (++depth(*owner()) > 100) {
170 owner() = &pending_store;
171 depth(pending_store) = 0;
172 repeat(pending_store) =
false;
179 set_error(awhat, std::current_exception());
180 for (
auto& what : pending(pending_store)) {
181 set_error(what, std::current_exception());
185 pending(pending_store).clear();
190 if (!pending(pending_store).
empty()) {
199 if (!pending(pending_store).
empty()) {
206 (
requires not Same<SingleReceiver, recurse_t>)
209 SingleReceiver awhat) {
217 auto& pending_store = *owner();
220 if (pending(pending_store).
empty()) {
223 repeat(pending_store) =
false;
226 go =
repeat(pending_store);
232 if (pending(pending_store).empty()) {
236 while (!pending(pending_store).empty()) {
237 auto what =
std::move(pending(pending_store).front());
238 pending(pending_store).pop_front();
247 template <
class E = std::exception_ptr>
255 template <
class E = std::exception_ptr>
260 template <
class E = std::exception_ptr>
264 template <
class E = std::exception_ptr>
283 template <
class AnyExec>
requires ReceiveValue< remove_cvref_t< SingleReceiver >, any_executor_ref< E > > void submit(SingleReceiver &&what)
detail::trampoline_id get_trampoline_id()
detail::delegator< E > trampoline()
std::remove_cv_t< std::remove_reference_t< T >> remove_cvref_t
constexpr detail::Map< Move > move
bool owned_by_trampoline()
detail::nester< E > nested_trampoline()
PUSHMI_INLINE_VAR constexpr __adl::set_error_fn set_error
requires ReceiveValue< remove_cvref_t< SingleReceiver >, any_executor_ref< E > > void submit(SingleReceiver &&what)
—— Concurrent Priority Queue Implementation ——
static void submit(Selector, Derived &, recurse_t)
constexpr const recurse_t recurse
trampoline_id(T *trampoline)
static int & depth(pending_type &p)
std::decay_t< E > error_type
requires not static Same< SingleReceiver, recurse_t > void submit(ownornest_t, SingleReceiver awhat)
static queue_type & pending(pending_type &p)
constexpr auto empty(C const &c) -> decltype(c.empty())
static bool & repeat(pending_type &p)
static trampoline_id get_id()
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::ownornest_t ownornest
std::deque< work_type > queue_type
#define PUSHMI_INLINE_VAR
requires requires(detail::apply_impl(std::declval< F >(), std::declval< Tuple >(), detail::tupidxs< Tuple >{}))) const expr decltype(auto) apply(F &&f
PUSHMI_TEMPLATE(class E=std::exception_ptr, class Wrapped)(requires Sender< detail
PUSHMI_INLINE_VAR constexpr __adl::set_value_fn set_value
PUSHMI_INLINE_VAR constexpr struct folly::pushmi::detail::ownordelegate_t ownordelegate
PUSHMI_INLINE_VAR constexpr __adl::do_submit_fn submit
std::tuple< int, queue_type, bool > pending_type
requiresdecltype(auto) SenderTo< delegator< E >, recurse_t > repeat(delegator< E > &exec)
static pending_type *& owner()
requires not static Same< SingleReceiver, recurse_t > void submit(ownordelegate_t, SingleReceiver awhat)
PUSHMI_INLINE_VAR constexpr __adl::set_done_fn set_done