MCPcopy Create free account
hub / github.com/Tencent/phxsql / run

Method run

phxsqlproxy/heartbeat_thread.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void HeartBeatThread::run() {
33 static int count = 0;
34 while (true) {
35 std::shared_ptr<PhxBinlogClient> client = PhxBinlogClientPlatformInfo::GetDefault()->GetClientFactory()
36 ->CreateClient();
37 int ret = client->HeartBeat();
38 if ((count++) % 60 == 0) {
39 phxsql::LogWarning("%s:%d heartbeat ret %d", __func__, __LINE__, ret);
40 count = 1;
41 }
42 poll(0, 0, 1000);
43 }
44}
45
46}

Callers

nothing calls this directly

Calls 4

LogWarningFunction · 0.85
CreateClientMethod · 0.80
GetClientFactoryMethod · 0.80
HeartBeatMethod · 0.45

Tested by

no test coverage detected