MCPcopy Create free account
hub / github.com/PaddlePaddle/Serving / AddTask

Method AddTask

core/predictor/framework/request_cache.cpp:204–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204int RequestCache::AddTask(uint64_t key, const Response& res) {
205 std::unique_lock<std::mutex> lock(queue_mutex_);
206 std::shared_ptr<Response> res_ptr = std::make_shared<Response>(res);
207 task_queue_.push(std::make_pair(key, res_ptr));
208 condition_.notify_one();
209 return 0;
210}
211
212bool RequestCache::Empty() {
213 std::lock_guard<std::recursive_mutex> lk(cache_mtx_);

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected