]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Lock.php
And moving the block back to the old place
[friendica.git] / src / Core / Lock.php
index 91c444253aa838a5fd3c8b4f5457bcf053bb0493..8bc2c242d18a588d984bb10be0c8daebd4e8e69e 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-namespace Friendica\Core;
-
 /**
  * @file src/Core/Lock.php
  * @brief Functions for preventing parallel execution of functions
  */
 
-use Friendica\Core\Logger;
+namespace Friendica\Core;
+
 use Friendica\Core\Cache\CacheDriverFactory;
 use Friendica\Core\Cache\IMemoryCacheDriver;
 
@@ -123,12 +122,13 @@ class Lock
        /**
         * @brief Releases a lock if it was set by us
         *
-        * @param string $key Name of the lock
+        * @param string $key      Name of the lock
+        * @param bool   $override Overrides the lock to get releases
         * @return void
         */
-       public static function release($key)
+       public static function release($key, $override = false)
        {
-               self::getDriver()->releaseLock($key);
+               self::getDriver()->releaseLock($key, $override);
        }
 
        /**