diff options
author | 2017-11-30 11:06:37 -0800 | |
---|---|---|
committer | 2017-11-30 11:06:37 -0800 | |
commit | ede1b2703d4058578b8b5830f006c89c9216521b (patch) | |
tree | 500984050a1f412d875218c1039686f28ebbd638 /src/core | |
parent | 10f2790f7fedb7b54889c9ba8297a9e127edb143 (diff) |
Merging master
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/iomgr/fork_posix.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/lib/iomgr/fork_posix.cc b/src/core/lib/iomgr/fork_posix.cc index a55b3a349a..969b7ac670 100644 --- a/src/core/lib/iomgr/fork_posix.cc +++ b/src/core/lib/iomgr/fork_posix.cc @@ -49,10 +49,10 @@ void grpc_prefork() { return; } if (grpc_is_initialized()) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_core::ExecCtx exec_ctx; grpc_timer_manager_set_threading(false); - grpc_executor_set_threading(&exec_ctx, false); - grpc_exec_ctx_finish(&exec_ctx); + grpc_executor_set_threading(false); + grpc_core::ExecCtx::Get()->Flush(); if (!gpr_await_threads( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(3, GPR_TIMESPAN)))) { @@ -64,18 +64,17 @@ void grpc_prefork() { void grpc_postfork_parent() { if (grpc_is_initialized()) { grpc_timer_manager_set_threading(true); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_executor_set_threading(&exec_ctx, true); - grpc_exec_ctx_finish(&exec_ctx); + grpc_core::ExecCtx exec_ctx; + grpc_executor_set_threading(true); } } void grpc_postfork_child() { if (grpc_is_initialized()) { grpc_timer_manager_set_threading(true); - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_executor_set_threading(&exec_ctx, true); - grpc_exec_ctx_finish(&exec_ctx); + grpc_core::ExecCtx exec_ctx; + grpc_executor_set_threading(true); + grpc_core::ExecCtx::Get()->Flush(); } } |