Repository navigation
Callback when a Mutex lock is aquired and/or freed #52031
Unanswered
Weissstreifen
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello everyone,
I currently have a problem with some instable commands running from my Kernel.php every few minutes. The commands must not overlap and may run between 5 to 30 minutes, depending on some external circumstances, so I execute them with the
withoutOverlapping()method. Sometimes (especially during night times) the process gets killed by effects I can't control and the mutex does not get freed for the given duration. It would be awesome if I could hook into the lifecycle of the mutex and call a function whenever the mutex gets aquired or freed. Then I could build my own monitoring and alert system around this feature.I know that I can pass a maximum time to live in the
withoutOverlapping()method, sadly this does not solve my problem because I don't know if a lock got freed or died of old age.I have not found anything related to it in the documentation, if such a feature does already exists I'm sorry for taking your time. Otherwise I'm happy to discuss.
Have a nice day!
All reactions