Commit e1af1682 authored by Eric Niebler's avatar Eric Niebler Committed by Facebook Github Bot

flow_single works with concepts emulation

fbshipit-source-id: 73b62ddd46201b81ea7f69c83f7f498ab45f6d13
parent 97d89ff6
...@@ -20,12 +20,16 @@ struct countdownsingle { ...@@ -20,12 +20,16 @@ struct countdownsingle {
int* counter; int* counter;
template <class ExecutorRef> template <class ExecutorRef>
void operator()(ExecutorRef exec) { void operator()(ExecutorRef exec) const;
};
template <class ExecutorRef>
void countdownsingle::operator()(ExecutorRef exec) const {
if (--*counter > 0) { if (--*counter > 0) {
exec | op::submit(mi::make_single(*this)); //exec | op::submit(mi::make_single(*this));
exec | op::submit(mi::single<countdownsingle, mi::abortEF, mi::ignoreDF>{*this});
} }
} }
};
struct inline_executor { struct inline_executor {
using properties = mi::property_set<mi::is_sender<>, mi::is_single<>>; using properties = mi::property_set<mi::is_sender<>, mi::is_single<>>;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment