Skip to content

Tried Implementation of Thread Pool #5

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

Open
wants to merge 2 commits into
base: concurrent-execution
Choose a base branch
from

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