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

Method Run

libs/drape/drape_routine.hpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54 template <typename Task>
55 static ResultPtr Run(Task && t)
56 {
57 ResultPtr result(new Result(Instance().GetNextId()));
58 auto const pushResult = Instance().m_workerThread.Push([result, t = std::forward<Task>(t)]() mutable
59 {
60 t();
61 Instance().Notify(result->Finish());
62 });
63
64 if (!pushResult.m_isSuccess)
65 return {};
66
67 return result;
68 }
69
70 template <typename Task>
71 static ResultPtr RunDelayed(base::DelayedThreadPool::Duration const & duration, Task && t)

Callers

nothing calls this directly

Calls 4

GetNextIdMethod · 0.80
PushMethod · 0.45
NotifyMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected