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

Fix gochannel-related races #115

Merged
merged 5 commits into from
Aug 28, 2019
Merged

Fix gochannel-related races #115

merged 5 commits into from
Aug 28, 2019

Conversation

m110
Copy link
Member

@m110 m110 commented Aug 27, 2019

This PR fixes data races reported by #111. They are related with concurrent closing of gochannel PubSub and Router.

Calling wg.Done() should not be locked, as this will lead to a deadlock
with wg.Wait(). The access to Wait() call should be locked though, as
Add() can be called in another goroutine.
@m110 m110 marked this pull request as ready for review August 27, 2019 19:26
@m110 m110 merged commit d5532e2 into master Aug 28, 2019
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.

None yet

2 participants