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

Method Do

libs/base/base_tests/threaded_list_test.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 {}
23
24 virtual void Do()
25 {
26 while (!m_p.IsCancelled())
27 {
28 int res = m_p.Front(true /* doPop */);
29 {
30 std::lock_guard<std::mutex> resGuard(m_resMutex);
31 m_res.push_back(res);
32 }
33 LOG(LINFO, (m_id, " thread got ", res));
34 threads::Sleep(10);
35 }
36 LOG(LINFO, (m_id, " thread is cancelled"));
37 }
38};
39
40UNIT_TEST(ThreadedList)

Callers

nothing calls this directly

Calls 4

SleepFunction · 0.85
IsCancelledMethod · 0.45
FrontMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected