diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-14 18:11:22 -0800 |
commit | 6c26b16fe06b1cc75b4dac372f4f51f6b7d1bfc0 (patch) | |
tree | 5d9b7bbdcf125bfc103b67778349ea075b049bb4 /src/core/lib/iomgr/timer_manager.cc | |
parent | 75122c23578e24417dcf64081c737571a9fc2dbc (diff) |
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r-- | src/core/lib/iomgr/timer_manager.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index 69adb673d8..6a43f4fadb 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -98,7 +98,7 @@ static void start_timer_thread_and_unlock(void) { } void grpc_timer_manager_tick() { - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; grpc_millis next = GRPC_MILLIS_INF_FUTURE; grpc_timer_check(&next); } @@ -125,7 +125,7 @@ static void run_some_timers() { if (GRPC_TRACER_ON(grpc_timer_check_trace)) { gpr_log(GPR_DEBUG, "flush exec_ctx"); } - ExecCtx::Get()->Flush(); + grpc_core::ExecCtx::Get()->Flush(); gpr_mu_lock(&g_mu); // garbage collect any threads hanging out that are dead gc_completed_threads(); @@ -178,7 +178,7 @@ static bool wait_until(grpc_millis next) { g_timed_waiter_deadline = next; if (GRPC_TRACER_ON(grpc_timer_check_trace)) { - grpc_millis wait_time = next - ExecCtx::Get()->Now(); + grpc_millis wait_time = next - grpc_core::ExecCtx::Get()->Now(); gpr_log(GPR_DEBUG, "sleep for a %" PRIdPTR " milliseconds", wait_time); } @@ -223,7 +223,7 @@ static bool wait_until(grpc_millis next) { static void timer_main_loop() { for (;;) { grpc_millis next = GRPC_MILLIS_INF_FUTURE; - ExecCtx::Get()->InvalidateNow(); + grpc_core::ExecCtx::Get()->InvalidateNow(); // check timer state, updates next to the next time to run a check switch (grpc_timer_check(&next)) { case GRPC_TIMERS_FIRED: @@ -273,7 +273,7 @@ static void timer_thread_cleanup(completed_thread* ct) { static void timer_thread(void* completed_thread_ptr) { // this threads exec_ctx: we try to run things through to completion here // since it's easy to spin up new threads - ExecCtx _local_exec_ctx; + grpc_core::ExecCtx _local_exec_ctx; timer_main_loop(); timer_thread_cleanup((completed_thread*)completed_thread_ptr); |