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

Method Run

phxqueue/consumer/freqman.cpp:145–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145void FreqMan::Run() {
146 comm::RetCode ret;
147 pid_t pid = fork();
148 if (pid == 0) {
149 prctl(PR_SET_PDEATHSIG, SIGHUP);
150
151 while (true) {
152 try {
153 if (comm::RetCode::RET_OK != (ret = UpdateLimitInfo())) {
154 QLErr("UpdateLimitInfo ret %d", ret);
155 }
156 ClearAllConsumeStat();
157 } catch (const std::exception& e) {
158 QLErr("exception %s", e.what());
159 }
160 sleep(5);
161 }
162 exit(0);
163 }
164}
165
166void FreqMan::ClearAllConsumeStat() {
167 comm::RetCode ret;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected