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

Function SubIDs2Mask

phxqueue/producer/producer.cpp:75–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static uint64_t SubIDs2Mask(const config::TopicConfig *topic_config, const set<int> *sub_ids) {
76 uint64_t mask = -1;
77 if (sub_ids) {
78 mask = 0;
79 int sub_id;
80 for (auto &&it : *sub_ids) {
81 sub_id = it;
82 if (sub_id > 0) mask |= (1ULL << (sub_id - 1ULL));
83 }
84 }
85 return mask;
86}
87
88
89comm::RetCode Producer::Enqueue(const int topic_id, const uint64_t uin, const int handle_id, const string &buffer,

Callers 1

EnqueueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected