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

Why a sync.Mutex being used vs. sync.RWMutex #84

Open
marcsantiago opened this issue Jun 15, 2020 · 1 comment
Open

Why a sync.Mutex being used vs. sync.RWMutex #84

marcsantiago opened this issue Jun 15, 2020 · 1 comment

Comments

@marcsantiago
Copy link

Wouldn't have better performance on the reads if a Read mutex is being used, since the many readers can access the data at the same time in a concurrent situation?

@coocood
Copy link
Owner

coocood commented Jun 16, 2020

Because read also need to modify the data.

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

No branches or pull requests

2 participants