MCPcopy Create free account
hub / github.com/Lwhyz/workspace / submit

Method submit

include/workspace/workspace.hpp:225–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 template <typename T = task::nor, typename F, typename R = details::result_of_t<F>,
224 typename DR = typename std::enable_if<std::is_void<R>::value>::type>
225 void submit(F&& task) {
226 assert(branches.size() > 0);
227 auto this_br = cur->get();
228 auto next_br = forward(cur)->get();
229 if (next_br->num_tasks() < this_br->num_tasks()) {
230 next_br->submit<T>(std::forward<F>(task));
231 } else {
232 this_br->submit<T>(std::forward<F>(task));
233 }
234 }
235 /**
236 * @brief async execute a task
237 * @tparam T task type

Callers 9

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 3

sizeMethod · 0.80
getMethod · 0.80
num_tasksMethod · 0.80

Tested by 4

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36