MCPcopy Create free account
hub / github.com/Tencent/phxqueue / Put

Method Put

phxqueue/comm/resourcepool.h:49–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 void Put(const KeyType &key, std::unique_ptr<ResourceType> &resource) {
50 std::lock_guard<std::mutex> lg(lock_);
51
52 auto &&resources = key2resources_[key];
53 resources.push(std::move(resource));
54 }
55
56 protected:
57 std::map<KeyType, std::queue<std::unique_ptr<ResourceType> > > key2resources_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected