MCPcopy Create free account
hub / github.com/apache/brpc / StartTaskAt

Method StartTaskAt

src/brpc/periodic_task.cpp:52–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void PeriodicTaskManager::StartTaskAt(PeriodicTask* task, const timespec& abstime) {
53 if (task == NULL) {
54 LOG(ERROR) << "Param[task] is NULL";
55 return;
56 }
57 bthread_timer_t timer_id;
58 const int rc = bthread_timer_add(
59 &timer_id, abstime, RunPeriodicTaskThread, task);
60 if (rc != 0) {
61 LOG(ERROR) << "Fail to add timer for RunPerodicTaskThread";
62 task->OnDestroyingTask();
63 return;
64 }
65}
66
67} // namespace brpc

Callers

nothing calls this directly

Calls 2

bthread_timer_addFunction · 0.85
OnDestroyingTaskMethod · 0.80

Tested by

no test coverage detected