From b8e07ad780ceb0bae7c431d0de1c6343bf275ceb Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 18 Jul 2017 13:20:55 -0700 Subject: Add asserts that uv calls all run on the same thread --- src/core/lib/iomgr/iomgr_uv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/lib/iomgr/iomgr_uv.c') diff --git a/src/core/lib/iomgr/iomgr_uv.c b/src/core/lib/iomgr/iomgr_uv.c index 7a99a6efdd..c484a39c54 100644 --- a/src/core/lib/iomgr/iomgr_uv.c +++ b/src/core/lib/iomgr/iomgr_uv.c @@ -22,14 +22,18 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr_uv.h" #include "src/core/lib/iomgr/pollset_uv.h" #include "src/core/lib/iomgr/tcp_uv.h" +gpr_thd_id grpc_init_thread; + void grpc_iomgr_platform_init(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_pollset_global_init(); grpc_register_tracer("tcp", &grpc_tcp_trace); grpc_executor_set_threading(&exec_ctx, false); + grpc_init_thread = gpr_thd_currentid(); grpc_exec_ctx_finish(&exec_ctx); } void grpc_iomgr_platform_flush(void) {} -- cgit v1.2.3