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

Method RunSequential

libs/drape/drape_routine.hpp:89–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 // Asynchronous execution for tasks when execution order matters.
88 template <typename Task>
89 static ResultPtr RunSequential(Task && t)
90 {
91 ResultPtr result(new Result(Instance().GetNextId()));
92 auto const pushResult = Instance().m_sequentialWorkerThread.Push([result, t = std::forward<Task>(t)]() mutable
93 {
94 t();
95 Instance().Notify(result->Finish());
96 });
97
98 if (!pushResult.m_isSuccess)
99 return {};
100
101 return result;
102 }
103
104private:
105 static DrapeRoutine & Instance(bool reinitialize = false)

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