MCPcopy Create free account
hub / github.com/Soundux/Soundux / push_unique

Method push_unique

src/helper/queue/queue.cpp:24–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 void Queue::push_unique(std::uint64_t id, std::function<void()> function)
25 {
26 {
27 std::lock_guard lock(queueMutex);
28 if (queue.find(id) != queue.end())
29 {
30 return;
31 }
32 }
33
34 std::unique_lock lock(queueMutex);
35 queue.emplace(id, std::move(function));
36 lock.unlock();
37
38 cv.notify_one();
39 }
40
41 Queue::Queue()
42 {

Callers 2

data_callbackMethod · 0.80
stopSoundsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected