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
2c523e5f
Commit
2c523e5f
authored
9 years ago
by
David Klempner
Browse files
Options
Downloads
Plain Diff
Merge pull request #1684 from ctiller/speculation-of-the-nation
Remove a potential deadlock
parents
faff1caf
dc6e86bb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/iomgr/pollset_posix.c
+5
-2
5 additions, 2 deletions
src/core/iomgr/pollset_posix.c
with
5 additions
and
2 deletions
src/core/iomgr/pollset_posix.c
+
5
−
2
View file @
2c523e5f
...
...
@@ -258,7 +258,6 @@ static void unary_poll_do_promote(void *args, int success) {
grpc_pollset
*
pollset
=
up_args
->
pollset
;
grpc_fd
*
fd
=
up_args
->
fd
;
int
do_shutdown_cb
=
0
;
gpr_free
(
up_args
);
/*
* This is quite tricky. There are a number of cases to keep in mind here:
...
...
@@ -273,8 +272,12 @@ static void unary_poll_do_promote(void *args, int success) {
/* First we need to ensure that nobody is polling concurrently */
while
(
pollset
->
counter
!=
0
)
{
grpc_pollset_kick
(
pollset
);
gpr_cv_wait
(
&
pollset
->
cv
,
&
pollset
->
mu
,
gpr_inf_future
);
grpc_iomgr_add_callback
(
unary_poll_do_promote
,
up_args
);
gpr_mu_unlock
(
&
pollset
->
mu
);
return
;
}
gpr_free
(
up_args
);
/* At this point the pollset may no longer be a unary poller. In that case
* we should just call the right add function and be done. */
/* TODO(klempner): If we're not careful this could cause infinite recursion.
...
...
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