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

Lock a file to avoid updating a same progress multiple time #7

Closed
Rudo2204 opened this issue Aug 19, 2020 · 1 comment · Fixed by #8
Closed

Lock a file to avoid updating a same progress multiple time #7

Rudo2204 opened this issue Aug 19, 2020 · 1 comment · Fixed by #8
Labels
bug Something isn't working next major version will be released in the next major version release of the crate

Comments

@Rudo2204
Copy link
Owner

Rudo2204 commented Aug 19, 2020

This could happen if the user use mendo multiple times in short session, it would spawn multiple mendo instances which will attempt to update the same progress.
The solution is to use something like fd-lock to lock the log file and unlock it when the update process is finished. This way the other process which spawned later will block until it can acquires the log file lock and then start its process.

@Rudo2204 Rudo2204 added bug Something isn't working next major version will be released in the next major version release of the crate labels Aug 19, 2020
@Rudo2204
Copy link
Owner Author

Rudo2204 commented Aug 19, 2020

@Rudo2204 Rudo2204 mentioned this issue Aug 23, 2020
@Rudo2204 Rudo2204 linked a pull request Aug 23, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next major version will be released in the next major version release of the crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant