Skip to content

Conversation

rohansbansal
Copy link

Edited the bench_concurrent.go to read same file when testing, and used a thread pool for the bounded buffer.

if errs.Err == nil {
for _, err := range errors {
if err != nil {
errs.rw.RUnlock()
Copy link
Owner

Choose a reason for hiding this comment

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

I believe this will cause a panic if an error is ever added since we have called RUnlock here without re-acquiring the read lock before the deferred RUnlock will execute.

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