Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffered channel should notify both condition variables on close #8094

Merged

Conversation

abhinavarora
Copy link
Contributor

While writing the unit tests for Buffered Channel, I found that when we close the channel, the receiver threads that are blocked do not get unblocked and hence are blocked forever. This is because in our Close and destructor method, we only notify the sender channels that are blocked. We should inform everyone when the channel is closed to unlock.

@abhinavarora abhinavarora self-assigned this Feb 3, 2018
@abhinavarora abhinavarora changed the title Channel should notify both condition variables on close Buffered channel should notify both condition variables on close Feb 3, 2018
Copy link
Contributor

@chengduoZH chengduoZH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chengduoZH chengduoZH merged commit 25d5686 into PaddlePaddle:develop Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants