Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/bthread/timer_thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


#include <queue> // heap functions
#include <gflags/gflags.h>
#include "butil/scoped_lock.h"
#include "butil/logging.h"
#include "butil/third_party/murmurhash3/murmurhash3.h" // fmix64
Expand All @@ -31,6 +32,8 @@

namespace bthread {

DEFINE_uint32(brpc_timer_num_buckets, 13, "brpc timer num buckets");

// Defined in task_control.cpp
void run_worker_startfn();

Expand Down Expand Up @@ -469,6 +472,7 @@ static void init_global_timer_thread() {
}
TimerThreadOptions options;
options.bvar_prefix = "bthread_timer";
options.num_buckets = FLAGS_brpc_timer_num_buckets;
const int rc = g_timer_thread->start(&options);
if (rc != 0) {
LOG(FATAL) << "Fail to start timer_thread, " << berror(rc);
Expand Down
Loading