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

Class function

example/cpp14/executors/fork_join.cpp:202–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200private:
201 template <class Func>
202 struct function : fork_join_pool::function_base
203 {
204 explicit function(Func f, const std::shared_ptr<std::size_t>& w)
205 : function_(std::move(f))
206 {
207 work_count_ = w;
208 execute_ = [](std::shared_ptr<fork_join_pool::function_base>& p)
209 {
210 Func tmp(std::move(static_cast<function*>(p.get())->function_));
211 p.reset();
212 tmp();
213 };
214 }
215
216 Func function_;
217 };
218
219 fork_join_pool& context_;
220 std::shared_ptr<std::size_t> work_count_;

Callers 5

operator()Method · 0.50
dispatchMethod · 0.50
postMethod · 0.50
deferMethod · 0.50
executeMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected