-
Notifications
You must be signed in to change notification settings - Fork 0
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
Clean-up and remove remaining data races #5
Conversation
@@ -235,91 +224,43 @@ func (r *RedisBus[M]) NumSubscribers(channelID string) (int, error) { | |||
return 0, fmt.Errorf("redisbus: pubsub is not running") | |||
} | |||
|
|||
vs, err := r.client.PubSubNumSub(r.ctx, r.namespace+channelID).Result() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkieltyka I completed this method and added some code to test it.
if err != nil { | ||
// TODO: timeout review..? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using Receive()
which is blocking and won't return a timeout, we can remove this bit.
@@ -9,7 +9,7 @@ import ( | |||
"sync" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated demos.
There were some rare data races remaining like
This PR will remove those data races and clean up the package