MCPcopy Create free account
hub / github.com/Snapchat/Valdi / dispose

Method dispose

valdi_core/src/valdi_core/cpp/Threading/TaskQueue.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void TaskQueue::dispose() {
30 if (!_disposed) {
31 _disposed = true;
32 std::deque<Task> toDelete;
33 _mutex.lock();
34 toDelete.swap(_tasks);
35 _mutex.unlock();
36 _condition.notifyAll();
37 }
38}
39
40void TaskQueue::sync(const DispatchFunction& function) {
41 barrier(function);

Callers

nothing calls this directly

Calls 4

notifyAllMethod · 0.80
lockMethod · 0.45
swapMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected