MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / PostMsg

Method PostMsg

src/libtools/utils/MultiThreadQueue.h:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 return m_queue.size() + m_delayed.size();
73 }
74 void PostMsg(TMessage&& msg, uint64_t delay = 0) {
75 std::unique_lock<std::mutex> lock(m_mtxQueue);
76 if (delay == 0)
77 m_queue.push_back(std::move(msg));
78 else {
79 m_delayed.emplace(Now() + std::chrono::milliseconds(delay), std::move(msg));
80 }
81 m_cvQueue.notify_all();
82 }
83 void Reinitialize() {
84 std::unique_lock<std::mutex> lock(m_mtxQueue);
85 m_queue.clear();

Callers 2

DrawTrayMenuMethod · 0.45
Draw_run_tabMethod · 0.45

Calls 3

NowFunction · 0.85
emplaceMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected