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

Method RunDelayed

libs/drape/drape_routine.hpp:71–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70 template <typename Task>
71 static ResultPtr RunDelayed(base::DelayedThreadPool::Duration const & duration, Task && t)
72 {
73 ResultPtr result(new Result(Instance().GetNextId()));
74 auto const pushResult =
75 Instance().m_workerThread.PushDelayed(duration, [result, t = std::forward<Task>(t)]() mutable
76 {
77 t();
78 Instance().Notify(result->Finish());
79 });
80
81 if (!pushResult.m_isSuccess)
82 return {};
83
84 return result;
85 }
86
87 // Asynchronous execution for tasks when execution order matters.
88 template <typename Task>

Callers

nothing calls this directly

Calls 4

GetNextIdMethod · 0.80
PushDelayedMethod · 0.80
NotifyMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected