aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/iomgr/exec_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/iomgr/exec_ctx.c')
-rw-r--r--src/core/iomgr/exec_ctx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/iomgr/exec_ctx.c b/src/core/iomgr/exec_ctx.c
index a830a27b0b..f2914d376e 100644
--- a/src/core/iomgr/exec_ctx.c
+++ b/src/core/iomgr/exec_ctx.c
@@ -35,16 +35,19 @@
#include <grpc/support/log.h>
-void grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) {
+int grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) {
+ int did_something = 0;
while (!grpc_closure_list_empty(exec_ctx->closure_list)) {
grpc_closure *c = exec_ctx->closure_list.head;
exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL;
while (c != NULL) {
grpc_closure *next = c->next;
+ did_something = 1;
c->cb(exec_ctx, c->cb_arg, c->success);
c = next;
}
}
+ return did_something;
}
void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) {