diff options
author | 2017-11-13 15:37:58 -0800 | |
---|---|---|
committer | 2017-11-14 01:36:28 -0800 | |
commit | 75122c23578e24417dcf64081c737571a9fc2dbc (patch) | |
tree | f4b8491964ec0508a5826490628c9f87b82c3326 /src/core/lib/iomgr/iocp_windows.cc | |
parent | 36cd68f0d543b9024c84eff82319890a791de7f6 (diff) |
Address some PR comments
Diffstat (limited to 'src/core/lib/iomgr/iocp_windows.cc')
-rw-r--r-- | src/core/lib/iomgr/iocp_windows.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/lib/iomgr/iocp_windows.cc b/src/core/lib/iomgr/iocp_windows.cc index 8f15f5e6cc..1686bf2872 100644 --- a/src/core/lib/iomgr/iocp_windows.cc +++ b/src/core/lib/iomgr/iocp_windows.cc @@ -46,7 +46,7 @@ static DWORD deadline_to_millis_timeout(grpc_millis deadline) { if (deadline == GRPC_MILLIS_INF_FUTURE) { return INFINITE; } - grpc_millis now = grpc_exec_ctx_now(); + grpc_millis now = ExecCtx::Get()->Now(); if (deadline < now) return 0; grpc_millis timeout = deadline - now; if (timeout > std::numeric_limits<DWORD>::max()) return INFINITE; @@ -65,7 +65,7 @@ grpc_iocp_work_status grpc_iocp_work(grpc_millis deadline) { success = GetQueuedCompletionStatus(g_iocp, &bytes, &completion_key, &overlapped, deadline_to_millis_timeout(deadline)); - grpc_exec_ctx_invalidate_now(); + ExecCtx::Get()->InvalidateNow(); if (success == 0 && overlapped == NULL) { return GRPC_IOCP_WORK_TIMEOUT; } @@ -118,16 +118,16 @@ void grpc_iocp_flush(void) { do { work_status = grpc_iocp_work(GRPC_MILLIS_INF_PAST); - } while (work_status == GRPC_IOCP_WORK_KICK || grpc_exec_ctx_flush()); + } while (work_status == GRPC_IOCP_WORK_KICK || ExecCtx::Get()->Flush()); } void grpc_iocp_shutdown(void) { ExecCtx _local_exec_ctx; while (gpr_atm_acq_load(&g_custom_events)) { grpc_iocp_work(GRPC_MILLIS_INF_FUTURE); - grpc_exec_ctx_flush(); + ExecCtx::Get()->Flush(); } - grpc_exec_ctx_finish(); + GPR_ASSERT(CloseHandle(g_iocp)); } |