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

Method RunTask

libs/platform/platform.hpp:301–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 /// in |task|. Use shared_ptr instead.
300 template <typename Task>
301 base::TaskLoop::PushResult RunTask(Thread thread, Task && task)
302 {
303 ASSERT(m_networkThread && m_fileThread && m_backgroundThread, ());
304 switch (thread)
305 {
306 case Thread::File: return m_fileThread->Push(std::forward<Task>(task));
307 case Thread::Network: return m_networkThread->Push(std::forward<Task>(task));
308 case Thread::Gui: return m_guiThread->Push(std::forward<Task>(task));
309 case Thread::Background: return m_backgroundThread->Push(std::forward<Task>(task));
310 }
311 UNREACHABLE();
312 }
313
314 template <typename Task>
315 base::TaskLoop::PushResult RunDelayedTask(Thread thread, base::DelayedThreadPool::Duration const & delay,

Callers 15

WaitPositionMethod · 0.80
WaitGraphicsMethod · 0.80
RunRequestMethod · 0.80
OnDownloadFinishedMethod · 0.80
ApplyDiffMethod · 0.80
RunMetaConfigAsyncMethod · 0.80
ScheduleRetryMethod · 0.80
UNIT_TESTFunction · 0.80
LoadMethod · 0.80

Calls 2

ASSERTFunction · 0.85
PushMethod · 0.45

Tested by 6

UNIT_TESTFunction · 0.64
UNIT_TESTFunction · 0.64
SessionStateTestMethod · 0.64
~SessionStateTestMethod · 0.64
TestMovingByUpdatingLatFunction · 0.64
UNIT_CLASS_TESTFunction · 0.64