MCPcopy Create free account
hub / github.com/boostorg/asio / pipeline

Function pipeline

example/cpp11/executors/pipeline.cpp:176–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174// Launch the last stage in a pipeline.
175template <class T, class F>
176std::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.
187template <class T, class F, class... Tail>

Callers 1

mainFunction · 0.70

Calls 4

get_associated_executorFunction · 0.85
thread_executorClass · 0.70
postFunction · 0.50
stopMethod · 0.45

Tested by

no test coverage detected