We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 this method which will use flock to ensure that the only one process can execute the given block at a time.
SugarUtils::File.flock_mutex(filename) do # code to run within the mutex end
The text was updated successfully, but these errors were encountered:
There has been some discussion of the appropriate best practices for doing this: https://www.ruby-forum.com/topic/77244
Sorry, something went wrong.
Another stackover flow example of this pattern: https://stackoverflow.com/questions/23748648/using-fileflock-as-ruby-global-lock-mutex-for-processes
No branches or pull requests
Add this method which will use flock to ensure that the only one process can execute the given block at a time.
The text was updated successfully, but these errors were encountered: