Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
40864743
Commit
40864743
authored
9 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Make grpc_exec_ctx_flush return a status indicating if work was performed
parent
084c8089
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/iomgr/exec_ctx.c
+4
-1
4 additions, 1 deletion
src/core/iomgr/exec_ctx.c
src/core/iomgr/exec_ctx.h
+3
-2
3 additions, 2 deletions
src/core/iomgr/exec_ctx.h
with
7 additions
and
3 deletions
src/core/iomgr/exec_ctx.c
+
4
−
1
View file @
40864743
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
src/core/iomgr/exec_ctx.h
+
3
−
2
View file @
40864743
...
...
@@ -61,8 +61,9 @@ struct grpc_exec_ctx {
{ GRPC_CLOSURE_LIST_INIT }
/** Flush any work that has been enqueued onto this grpc_exec_ctx.
* Caller must guarantee that no interfering locks are held. */
void
grpc_exec_ctx_flush
(
grpc_exec_ctx
*
exec_ctx
);
* Caller must guarantee that no interfering locks are held.
* Returns 1 if work was performed, 0 otherwise. */
int
grpc_exec_ctx_flush
(
grpc_exec_ctx
*
exec_ctx
);
/** Finish any pending work for a grpc_exec_ctx. Must be called before
* the instance is destroyed, or work may be lost. */
void
grpc_exec_ctx_finish
(
grpc_exec_ctx
*
exec_ctx
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment