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

Add mutex lock on write-to-file function #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bjornaer
Copy link

proposed solution for #4

as the issue states, the idea is adding a lock when block service writes to file

@naqvijafar91
Copy link
Owner

@bjornaer Looks good to me, but can you also write some integration tests with concurrent goroutines trying to write and then in the end verify that all the required data is finally written and nothing is corrupted. Bdw, thanks for showing interest, i created this so that i can understand the internals of how a database works, and this PR would make it more close to actual minimal use cases.

@bjornaer
Copy link
Author

@naqvijafar91 definitely, will do so then

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.

None yet

2 participants