File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 33#include < functional>
44#include < cstdint>
55#include < future>
6- // #include <type_traits >
6+ #include < cassert >
77
88#pragma once
99
1010namespace csi {
1111 namespace async {
1212
1313 enum end_condition_t { FIRST_FAIL, FIRST_SUCCESS, ALL }; // could this be a user defined function instead??
14- enum scheduling_t { PARALLEL, SEQUENTIAL }; // node async calls this parallell & waterfall
14+ enum scheduling_t { PARALLEL, SEQUENTIAL }; // node async calls this parallel & waterfall
1515
1616 template <typename result_type>
1717 class work
@@ -136,7 +136,17 @@ namespace csi {
136136 _end_condition (ec),
137137 _work (f) {}
138138
139- void push_back (async_function f) { _work.push_back (f); }
139+ void push_back (async_function f) {
140+ _work.push_back (f);
141+ }
142+
143+ async_function get_function (size_t index) {
144+ return _work[index];
145+ }
146+
147+ result_type get_result (size_t index) {
148+ return (*_result)[index];
149+ }
140150
141151 result_type operator ()() {
142152 std::promise<result_type> p;
You can’t perform that action at this time.
0 commit comments