diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-06 08:58:06 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-06 08:58:06 -0700 |
commit | 95bdfaa7a0b9244fdfcb81e439b085bd61df5648 (patch) | |
tree | 4097e804d08a7276f9196c9f4e797bd73f03d55e /src/core | |
parent | 038d26acd80878366c9df40a36d91db7c684aa7f (diff) | |
parent | 57e9189fe91da3a359115d1bfa9be192e9e30a84 (diff) |
Merge branch 'y12kdm3' of github.com:ctiller/grpc into y12kdm3
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/iomgr/pollset.h | 3 | ||||
-rw-r--r-- | src/core/iomgr/pollset_windows.c | 9 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/core/iomgr/pollset.h b/src/core/iomgr/pollset.h index 3de0ca7ebd..337596cb74 100644 --- a/src/core/iomgr/pollset.h +++ b/src/core/iomgr/pollset.h @@ -74,8 +74,7 @@ void grpc_pollset_destroy(grpc_pollset *pollset); grpc_pollset_work, and it is guaranteed that GRPC_POLLSET_MU(pollset) will not be released by grpc_pollset_work AFTER worker has been destroyed. - Returns true if some work has been done, and false if the deadline - expired. */ + Tries not to block past deadline. */ void grpc_pollset_work(grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec now, gpr_timespec deadline); diff --git a/src/core/iomgr/pollset_windows.c b/src/core/iomgr/pollset_windows.c index 22dc5891c3..1078fa5384 100644 --- a/src/core/iomgr/pollset_windows.c +++ b/src/core/iomgr/pollset_windows.c @@ -100,13 +100,9 @@ void grpc_pollset_destroy(grpc_pollset *pollset) { gpr_mu_destroy(&pollset->mu); } -int grpc_pollset_work(grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec deadline) { - gpr_timespec now; +void grpc_pollset_work(grpc_pollset *pollset, grpc_pollset_worker *worker, + gpr_timespec now, gpr_timespec deadline) { int added_worker = 0; - now = gpr_now(GPR_CLOCK_MONOTONIC); - if (gpr_time_cmp(now, deadline) > 0) { - return 0 /* GPR_FALSE */; - } worker->next = worker->prev = NULL; gpr_cv_init(&worker->cv); if (grpc_maybe_call_delayed_callbacks(&pollset->mu, 1 /* GPR_TRUE */)) { @@ -127,7 +123,6 @@ done: if (added_worker) { remove_worker(pollset, worker); } - return 1 /* GPR_TRUE */; } void grpc_pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) { |