mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/11495] Add owns_lock() method to lock classes
PHPBB3-11495
This commit is contained in:
@@ -116,6 +116,17 @@ class phpbb_lock_db
|
||||
return $this->locked;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this process own the lock?
|
||||
*
|
||||
* @return bool true if lock is owned
|
||||
* false otherwise
|
||||
*/
|
||||
public function owns_lock()
|
||||
{
|
||||
return (bool) $this->locked;
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases the lock.
|
||||
*
|
||||
|
@@ -110,6 +110,17 @@ class phpbb_lock_flock
|
||||
return (bool) $this->lock_fp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does this process own the lock?
|
||||
*
|
||||
* @return bool true if lock is owned
|
||||
* false otherwise
|
||||
*/
|
||||
public function owns_lock()
|
||||
{
|
||||
return (bool) $this->lock_fp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases the lock.
|
||||
*
|
||||
|
Reference in New Issue
Block a user