| 200 | private: |
| 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_; |
no outgoing calls
no test coverage detected