| 174 | // Launch the last stage in a pipeline. |
| 175 | template <class T, class F> |
| 176 | std::future<void> pipeline(queue_back<T> in, F f) |
| 177 | { |
| 178 | // Get the function's associated executor, defaulting to thread_executor. |
| 179 | auto ex = get_associated_executor(f, thread_executor()); |
| 180 | |
| 181 | // Run the function, and as we're the last stage return a future so that the |
| 182 | // caller can wait for the pipeline to finish. |
| 183 | return post(ex, use_future([in, f]() mutable { f(in); })); |
| 184 | } |
| 185 | |
| 186 | // Launch an intermediate stage in a pipeline. |
| 187 | template <class T, class F, class... Tail> |
no test coverage detected