aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-11 20:12:45 -0800
committerGravatar Craig Tiller <ctiller@google.com>2016-03-11 20:12:45 -0800
commit9fb89ea9e31dbe376fc1ce9c173d4e52f4b31290 (patch)
treeebfb2320c93008014c7b3874fe01e36234545411 /src/core/iomgr
parent948fa1b1b5052b0ae109f52169918e73b9b4f5a7 (diff)
If we cant check timers due to contention, at least make sure we do a follow up check soon
Diffstat (limited to 'src/core/iomgr')
-rw-r--r--src/core/iomgr/timer.c3
-rw-r--r--src/core/iomgr/timer.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/core/iomgr/timer.c b/src/core/iomgr/timer.c
index 8379fffad0..8badd83bbb 100644
--- a/src/core/iomgr/timer.c
+++ b/src/core/iomgr/timer.c
@@ -330,6 +330,9 @@ static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now,
gpr_mu_unlock(&g_mu);
gpr_mu_unlock(&g_checker_mu);
+ } else if (next != NULL) {
+ *next = gpr_time_min(
+ *next, gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN)));
}
return (int)n;
diff --git a/src/core/iomgr/timer.h b/src/core/iomgr/timer.h
index 9ad1e92f42..e239e884e7 100644
--- a/src/core/iomgr/timer.h
+++ b/src/core/iomgr/timer.h
@@ -96,7 +96,6 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer);
*next is never guaranteed to be updated on any given execution; however,
with high probability at least one thread in the system will see an update
at any time slice. */
-
bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now,
gpr_timespec *next);
void grpc_timer_list_init(gpr_timespec now);