MCPcopy Create free account
hub / github.com/comaps/comaps / SubmitWork

Method SubmitWork

libs/base/thread_pool_computational.hpp:84–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 // Warning: If the thread pool is stopped then the call will be ignored.
83 template <typename F, typename... Args>
84 void SubmitWork(F && func, Args &&... args)
85 {
86 auto f = std::bind(std::forward<F>(func), std::forward<Args>(args)...);
87 {
88 std::unique_lock lock(m_mutex);
89 if (m_done)
90 return;
91
92 m_queue.emplace(std::move(f));
93 }
94 m_condition.notify_one();
95 }
96
97 // Stop a ThreadPool.
98 // Removes the tasks that are not yet started from the queue.

Callers 8

RunGenerateIsolinesTasksFunction · 0.80
ForEachMwmTmpFunction · 0.80
AppendToMwmTmpFunction · 0.80
EmitMethod · 0.80
BuildIndexMethod · 0.80
RunMethod · 0.80
RunTestFunction · 0.80

Calls 1

emplaceMethod · 0.45

Tested by 1

RunTestFunction · 0.64