71 template <
typename ValueT,
typename ResultT,
typename ExecutorT>
84 if (
state_->values.empty()) {
89 auto resultFuture = resultPromise.
getFuture();
110 state.
values.swap(values);
115 if (results.size() != promises.size()) {
116 throw std::logic_error(
117 "Unexpected number of results returned from dispatch function");
120 for (
size_t i = 0;
i < promises.size();
i++) {
123 }
catch (
const std::exception& ex) {
124 for (
size_t i = 0;
i < promises.size();
i++) {
125 promises[
i].setException(
129 for (
size_t i = 0;
i < promises.size();
i++) {
std::vector< folly::Promise< ResultT >> PromiseBatchT
static void dispatchFunctionWrapper(DispatchState &state)
std::vector< ValueT > ValueBatchT
Future< ResultT > add(ValueT value)
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
PUSHMI_INLINE_VAR constexpr __adl::get_executor_fn executor
std::vector< ResultT > ResultBatchT
std::shared_ptr< DispatchState > state_
DispatchState(DispatchFunctionT &&dispatchFunction)
BatchDispatcher(ExecutorT &executor, DispatchFunctionT dispatchFunc)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
DispatchFunctionT dispatchFunc