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 concurrency issue in MemMapFs.Mkdir/MkdirAll #379

Merged
merged 1 commit into from
Nov 14, 2022

Conversation

bep
Copy link
Collaborator

@bep bep commented Nov 14, 2022

  • The backing map is protected by a RWMutex
  • This commit double checks for the existence of the directory inside the write lock to avoid potential data races when multiple goroutines tries to create
    the same directory.

Fixes #361
Fixes #298

* The backing map is protected by a RWMutex
* This commit double checks for the existence of the directory inside the write lock to avoid potential data races when multiple goroutines tries to create
the same directory.

Fixes spf13#361
Fixes spf13#298
@bep bep merged commit a800a9d into spf13:master Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant