namespace Friendica\Core\Lock;
+use Friendica\Core\Cache;
+
class SemaphoreLockDriver extends AbstractLockDriver
{
private static $semaphore = [];
}
/**
- *
* (@inheritdoc)
*/
- public function acquireLock($key, $timeout = 120)
+ public function acquireLock($key, $timeout = 120, $ttl = Cache::FIVE_MINUTES)
{
self::$semaphore[$key] = sem_get(self::semaphoreKey($key));
if (self::$semaphore[$key]) {
/**
* (@inheritdoc)
*/
- public function releaseLock($key)
+ public function releaseLock($key, $override = false)
{
if (empty(self::$semaphore[$key])) {
return false;