pull origin

This commit is contained in:
RichWeber
2014-08-01 00:32:08 +03:00
parent 5a8bd4747d
commit 92cd13a913
411 changed files with 4872 additions and 1587 deletions

View File

@@ -29,6 +29,7 @@ abstract class DbMutex extends Mutex
*/
public $db = 'db';
/**
* Initializes generic database table based mutex implementation.
* @throws InvalidConfigException if [[db]] is invalid.

View File

@@ -58,11 +58,13 @@ class FileMutex extends Mutex
* but read-only for other users.
*/
public $dirMode = 0775;
/**
* @var resource[] stores all opened lock files. Keys are lock names and values are file handles.
*/
private $_files = [];
/**
* Initializes mutex component implementation dedicated for UNIX, GNU/Linux, Mac OS X, and other UNIX-like
* operating systems.
@@ -70,7 +72,7 @@ class FileMutex extends Mutex
*/
public function init()
{
if (stripos(php_uname('s'), 'win') === 0) {
if (DIRECTORY_SEPARATOR === '\\') {
throw new InvalidConfigException('FileMutex does not have MS Windows operating system support.');
}
$this->mutexPath = Yii::getAlias($this->mutexPath);

View File

@@ -38,11 +38,13 @@ abstract class Mutex extends Component
* acquire in this process must be released in any case (regardless any kind of errors or exceptions).
*/
public $autoRelease = true;
/**
* @var string[] names of the locks acquired in the current PHP process.
*/
private $_locks = [];
/**
* Initializes the mutex component.
*/