MCPcopy Create free account
hub / github.com/OAID/Tengine / RemoveQueue

Method RemoveQueue

executor/lib/generic_dev_executor.cpp:82–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 Unlock(*p_mutex);
81}
82bool GenericDevExecutor::RemoveQueue(QueueType queue_type, SubgraphTask* task)
83{
84 std::mutex* p_mutex = nullptr;
85 task_queue_t* p_queue = nullptr;
86
87 if(!GetQueueReference(queue_type, p_mutex, p_queue))
88 return false;
89
90 Lock(*p_mutex);
91
92 auto ir = p_queue->find(task->exec_priority);
93
94 if(ir == p_queue->end())
95 {
96 Unlock(*p_mutex);
97 return false;
98 }
99
100 bool ret;
101
102 if(ir->second.erase(task))
103 ret = true;
104 else
105 ret = false;
106
107 Unlock(*p_mutex);
108
109 return ret;
110}
111SubgraphTask* GenericDevExecutor::PopQueue(QueueType queue_type)
112{
113 std::mutex* p_mutex = nullptr;

Callers

nothing calls this directly

Calls 2

endMethod · 0.80
GetStatusMethod · 0.45

Tested by

no test coverage detected