[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Resource locking handling. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Author: | Aaron Schulz |
File Size: | 105 lines (3 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ScopedLock:: (4 methods):
__construct()
factory()
release()
__destruct()
Class: ScopedLock - X-Ref
Self-releasing locks__construct( LockManager $manager, array $pathsByType, Status $status ) X-Ref |
param: LockManager $manager param: array $pathsByType Map of lock types to path lists param: Status $status |
factory(LockManager $manager, array $paths, $type, Status $status, $timeout = 0) X-Ref |
Get a ScopedLock object representing a lock on resource paths. Any locks are released once this object goes out of scope. The status object is updated with any errors or warnings. param: LockManager $manager param: array $paths List of storage paths or map of lock types to path lists param: int|string $type LockManager::LOCK_* constant or "mixed" and $paths param: Status $status param: int $timeout Timeout in seconds (0 means non-blocking) (since 1.22) return: ScopedLock|null Returns null on failure |
release( ScopedLock &$lock = null ) X-Ref |
Release a scoped lock and set any errors in the attatched Status object. This is useful for early release of locks before function scope is destroyed. This is the same as setting the lock object to null. param: ScopedLock $lock |
__destruct() X-Ref |
Release the locks when this goes out of scope |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |