Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
9e320daf
Commit
9e320daf
authored
May 29, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc comments for the 'mutex' classes extended
parent
f1f158aa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
0 deletions
+47
-0
DbMutex.php
framework/mutex/DbMutex.php
+4
-0
FileMutex.php
framework/mutex/FileMutex.php
+23
-0
Mutex.php
framework/mutex/Mutex.php
+0
-0
MysqlMutex.php
framework/mutex/MysqlMutex.php
+20
-0
No files found.
framework/mutex/DbMutex.php
View file @
9e320daf
...
...
@@ -13,6 +13,10 @@ use yii\base\InvalidConfigException;
use
yii\di\Instance
;
/**
* DbMutex is the base class for classes, which relies on database while implementing mutex "lock" mechanism.
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/
...
...
framework/mutex/FileMutex.php
View file @
9e320daf
...
...
@@ -12,6 +12,29 @@ use yii\base\InvalidConfigException;
use
yii\helpers\FileHelper
;
/**
* FileMutex implements mutex "lock" mechanism via local file system files.
* This component relies on PHP `flock()` function.
*
* Application configuration example:
*
* ```
* [
* 'components' => [
* 'mutex'=> [
* 'class' => 'yii\mutex\FileMutex'
* ],
* ],
* ]
* ```
*
* Note: this component can maintain the locks only for the single web server,
* it probably will not suffice to your in case you are using cloud server solution.
*
* Warning: due to `flock()` function nature this component is unreliable when
* using a multithreaded server API like ISAPI.
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/
...
...
framework/mutex/Mutex.php
View file @
9e320daf
No preview for this file type
framework/mutex/MysqlMutex.php
View file @
9e320daf
...
...
@@ -11,6 +11,26 @@ use Yii;
use
yii\base\InvalidConfigException
;
/**
* MysqlMutex implements mutex "lock" mechanism via MySQL locks.
*
* Application configuration example:
*
* ```
* [
* 'components' => [
* 'db'=> [
* 'class' => 'yii\db\Connection',
* 'dsn' => 'mysql:host=127.0.0.1;dbname=demo',
* ]
* 'mutex'=> [
* 'class' => 'yii\mutex\MysqlMutex',
* ],
* ],
* ]
* ```
*
* @see Mutex
*
* @author resurtm <resurtm@gmail.com>
* @since 2.0
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment