diff options
author | Vijay Pai <vpai@google.com> | 2017-09-01 14:08:42 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2017-09-07 11:34:13 -0700 |
commit | 58c33ba19bcec079d0991822055f28e804540426 (patch) | |
tree | 57acb6a9069c5464898b63e0a531556ea5f19650 /src/core/lib/iomgr/timer_uv.c | |
parent | 24f30f7ac0225530ae84dd064c683d7d11c3ac2b (diff) |
Decouple alarm construction from setting to avoid races in MT code
Diffstat (limited to 'src/core/lib/iomgr/timer_uv.c')
-rw-r--r-- | src/core/lib/iomgr/timer_uv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c index 70f49bcbe8..adced41f53 100644 --- a/src/core/lib/iomgr/timer_uv.c +++ b/src/core/lib/iomgr/timer_uv.c @@ -77,6 +77,8 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, uv_unref((uv_handle_t *)uv_timer); } +void grpc_timer_init_unset(grpc_timer *timer) { timer->pending = 0; } + void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { GRPC_UV_ASSERT_SAME_THREAD(); if (timer->pending) { |