aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/iomgr.cc
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-11-28 18:06:23 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2017-11-28 18:06:23 -0800
commit03412ee9de902e378bc4cea933397ebe5faddc29 (patch)
tree8976a958d4c9855481425452e578ab4a4e315ad0 /src/core/lib/iomgr/iomgr.cc
parent81fc8c9c336fab7a71b448f748a32d680301277c (diff)
Remove TLS_NO_SUPPORT and always use GPR_TLS. Reorder statements in grpc_init and grpc_shutdown. Add grpc_init and grpc_shutdown in failing test/cpp tests
Diffstat (limited to 'src/core/lib/iomgr/iomgr.cc')
-rw-r--r--src/core/lib/iomgr/iomgr.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc
index 570d97443d..27e9376272 100644
--- a/src/core/lib/iomgr/iomgr.cc
+++ b/src/core/lib/iomgr/iomgr.cc
@@ -46,15 +46,12 @@ static int g_shutdown;
static grpc_iomgr_object g_root_object;
void grpc_iomgr_init() {
+ grpc_core::ExecCtx _local_exec_ctx;
g_shutdown = 0;
gpr_mu_init(&g_mu);
gpr_cv_init(&g_rcv);
- grpc_core::ExecCtx::GlobalInit();
- {
- grpc_core::ExecCtx _local_exec_ctx;
- grpc_executor_init();
- grpc_timer_list_init();
- }
+ grpc_executor_init();
+ grpc_timer_list_init();
g_root_object.next = g_root_object.prev = &g_root_object;
g_root_object.name = (char*)"root";
grpc_network_status_init();
@@ -85,7 +82,6 @@ void grpc_iomgr_shutdown() {
gpr_timespec last_warning_time = gpr_now(GPR_CLOCK_REALTIME);
{
- grpc_core::ExecCtx _local_exec_ctx(0);
grpc_timer_manager_shutdown();
grpc_iomgr_platform_flush();
grpc_executor_shutdown();
@@ -141,8 +137,8 @@ void grpc_iomgr_shutdown() {
}
}
gpr_mu_unlock(&g_mu);
-
grpc_timer_list_shutdown();
+ grpc_core::ExecCtx::Get()->Flush();
}
/* ensure all threads have left g_mu */
@@ -150,7 +146,6 @@ void grpc_iomgr_shutdown() {
gpr_mu_unlock(&g_mu);
grpc_iomgr_platform_shutdown();
- grpc_core::ExecCtx::GlobalShutdown();
grpc_network_status_shutdown();
gpr_mu_destroy(&g_mu);
gpr_cv_destroy(&g_rcv);