-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Feature request: flock #6293
Comments
|
@dumblob Thank you! It's working so far. I've implemented it like this:
|
@logTom glad it works for you. And oh, I forgot to remove the dir at return from |
Ah, there is one caveat - this doesn't work if v panics or I stop the program midway with an exit(1) for debugging. I also tried it with defer. |
I'm glad you shout here about this unwise decision. I'm shouting as well. We'll all cry one day about this IMHO biggest issue of V. Read more about On the positive side, @medvednikov and others, would you "dare" to contemplate about |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi, does v have something like flock from PHP? https://www.php.net/manual/en/function.flock.php
Because I'm looking for a way to prevent double running a long process that is started via cron.
On discord someone mentioned that I could maybe use os.signal, but I'm not so sure how to implement it.
The text was updated successfully, but these errors were encountered: