You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it could be cool to be able to do oneliners like this, with static methods:
if (\Dorantor\FileLock::acquire('path')){
//do work...
\Dorantor\FileLock::release('path');
}
Also fluent locking with closures:
\Dorantor\FileLock::lock('/path/file')->acquired(function(){echo("HELLO FROM LOCK!");});
\Dorantor\FileLock::lock('/path/file')->failure(function(){echo("LOCK NOT ACQUIRED!");});
\Dorantor\FileLock::lock('/path/file')->acquired(function(){echo("HELLO FROM LOCK!");})->failure(function(){echo("LOCK NOT ACQUIRED!");});
The text was updated successfully, but these errors were encountered:
beppe9000
changed the title
Static version of the library?
Static version of the library and other things?
Nov 29, 2018
I think it could be cool to be able to do oneliners like this, with static methods:
Also fluent locking with closures:
The text was updated successfully, but these errors were encountered: