aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/iomgr.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-05-30 12:50:51 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-05-30 12:50:51 -0700
commit7ebf31bcb2548a3b66805c8e2a7667e234536fd2 (patch)
treecb6b2dd962b6334762c29093d1e9fded8ae3f4ac /src/core/lib/iomgr/iomgr.c
parentb2ef1cf67fc894343a7bf5579605049fbffabfa2 (diff)
parent1ed31187c3a5e6dd196892f09a3773ce31c57f17 (diff)
Merge branch 'thread_pool' into ALL-the-things
Diffstat (limited to 'src/core/lib/iomgr/iomgr.c')
-rw-r--r--src/core/lib/iomgr/iomgr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c
index d0071bfc94..391449136e 100644
--- a/src/core/lib/iomgr/iomgr.c
+++ b/src/core/lib/iomgr/iomgr.c
@@ -44,6 +44,7 @@
#include <grpc/support/useful.h>
#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/network_status_tracker.h"
#include "src/core/lib/iomgr/timer.h"
@@ -56,11 +57,12 @@ static gpr_cv g_rcv;
static int g_shutdown;
static grpc_iomgr_object g_root_object;
-void grpc_iomgr_init(void) {
+void grpc_iomgr_init(grpc_exec_ctx *exec_ctx) {
g_shutdown = 0;
gpr_mu_init(&g_mu);
gpr_cv_init(&g_rcv);
grpc_exec_ctx_global_init();
+ grpc_executor_init(exec_ctx);
grpc_timer_list_init(gpr_now(GPR_CLOCK_MONOTONIC));
g_root_object.next = g_root_object.prev = &g_root_object;
g_root_object.name = "root";
@@ -68,7 +70,7 @@ void grpc_iomgr_init(void) {
grpc_iomgr_platform_init();
}
-void grpc_iomgr_start(void) { grpc_timer_manager_init(); }
+void grpc_iomgr_start(grpc_exec_ctx *exec_ctx) { grpc_timer_manager_init(); }
static size_t count_objects(void) {
grpc_iomgr_object *obj;
@@ -93,6 +95,7 @@ void grpc_iomgr_shutdown(grpc_exec_ctx *exec_ctx) {
grpc_timer_manager_shutdown();
grpc_iomgr_platform_flush();
+ grpc_executor_shutdown(exec_ctx);
gpr_mu_lock(&g_mu);
g_shutdown = 1;