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

Method cancel

valdi_core/src/valdi_core/cpp/Threading/TaskQueue.cpp:106–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void TaskQueue::cancel(Valdi::task_id_t taskId) {
107 {
108 DispatchFunction toDelete;
109 std::lock_guard<Mutex> lockGuard(_mutex);
110 toDelete = lockFreeRemoveTask(taskId);
111 }
112
113 _condition.notifyAll();
114}
115
116DispatchFunction TaskQueue::lockFreeRemoveTask(task_id_t taskId) {
117 for (auto i = _tasks.begin(); i != _tasks.end(); ++i) {

Callers

nothing calls this directly

Calls 1

notifyAllMethod · 0.80

Tested by

no test coverage detected