|
|
@ -119,9 +119,7 @@ void grpc_iocp_work(grpc_exec_ctx *exec_ctx, gpr_timespec deadline) { |
|
|
|
info->has_pending_iocp = 1; |
|
|
|
info->has_pending_iocp = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
gpr_mu_unlock(&socket->state_mu); |
|
|
|
gpr_mu_unlock(&socket->state_mu); |
|
|
|
if (closure) { |
|
|
|
grpc_exec_ctx_enqueue(exec_ctx, closure, 1); |
|
|
|
closure->cb(exec_ctx, closure->cb_arg, 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void grpc_iocp_init(void) { |
|
|
|
void grpc_iocp_init(void) { |
|
|
@ -139,6 +137,14 @@ void grpc_iocp_kick(void) { |
|
|
|
GPR_ASSERT(success); |
|
|
|
GPR_ASSERT(success); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void grpc_iocp_flush(void) { |
|
|
|
|
|
|
|
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
grpc_iocp_work(&exec_ctx, gpr_inf_future(GPR_CLOCK_MONOTONIC)); |
|
|
|
|
|
|
|
} while (grpc_exec_ctx_flush(&exec_ctx)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void grpc_iocp_shutdown(void) { |
|
|
|
void grpc_iocp_shutdown(void) { |
|
|
|
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
|
|
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; |
|
|
|
while (gpr_atm_acq_load(&g_custom_events)) { |
|
|
|
while (gpr_atm_acq_load(&g_custom_events)) { |
|
|
|