aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/lock/flock.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/lock/flock.php')
-rw-r--r--phpBB/includes/lock/flock.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/lock/flock.php b/phpBB/includes/lock/flock.php
index 97bc7dd2b9..17de0847c0 100644
--- a/phpBB/includes/lock/flock.php
+++ b/phpBB/includes/lock/flock.php
@@ -111,6 +111,17 @@ class phpbb_lock_flock
}
/**
+ * 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.
*
* The lock must have been previously obtained, that is, acquire() call