@@ -48,8 +48,7 @@ This library uses the namespace `Malkusch\Lock`.
4848
4949### Mutex
5050
51- The [ ` Malkusch\Lock\Mutex\Mutex ` ] [ 5 ] class is an abstract class and provides the
52- base API for this library.
51+ The [ ` Malkusch\Lock\Mutex\Mutex ` ] [ 5 ] interface provides the base API for this library.
5352
5453#### Mutex::synchronized()
5554
@@ -125,9 +124,9 @@ if ($newBalance === false) {
125124}
126125```
127126
128- ### Extracting code result after lock release exception
127+ #### Extracting code result after lock release exception
129128
130- Mutex implementations based on [ ` Malkush\Lock\Mutex\LockMutex ` ] [ 10 ] will throw
129+ Mutex implementations based on [ ` Malkush\Lock\Mutex\AbstractLockMutex ` ] [ 10 ] will throw
131130[ ` Malkusch\Lock\Exception\LockReleaseException ` ] [ 11 ] in case of lock release
132131problem, but the synchronized code block will be already executed at this point.
133132In order to read the code result (or an exception thrown there),
@@ -160,9 +159,8 @@ try {
160159
161160### Implementations
162161
163- Because the [ ` Malkusch\Lock\Mutex\Mutex ` ] ( #mutex ) class is an abstract class,
164- you can choose from one of the provided implementations or create/extend your
165- own implementation.
162+ You can choose from one of the provided [ ` Malkusch\Lock\Mutex\Mutex ` ] ( #mutex ) interface
163+ implementations or create/extend your own implementation.
166164
167165- [ ` FlockMutex ` ] ( #flockmutex )
168166- [ ` MemcachedMutex ` ] ( #memcachedmutex )
@@ -171,7 +169,7 @@ own implementation.
171169- [ ` SemaphoreMutex ` ] ( #semaphoremutex )
172170- [ ` TransactionalMutex ` ] ( #transactionalmutex )
173171- [ ` MySQLMutex ` ] ( #mysqlmutex )
174- - [ ` PgAdvisoryLockMutex ` ] ( #pgadvisorylockmutex )
172+ - [ ` PostgreSQLMutex ` ] ( #PostgreSQLMutex )
175173
176174#### FlockMutex
177175
@@ -342,9 +340,9 @@ $mutex->synchronized(function () use ($bankAccount, $amount) {
342340});
343341```
344342
345- #### PgAdvisoryLockMutex
343+ #### PostgreSQLMutex
346344
347- The ** PgAdvisoryLockMutex ** uses PostgreSQL's
345+ The ** PostgreSQLMutex ** uses PostgreSQL's
348346[ advisory locking] ( https://www.postgresql.org/docs/9.4/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS )
349347functions.
350348
@@ -357,7 +355,7 @@ interrupted, the lock is automatically released.
357355``` php
358356$pdo = new \PDO('pgsql:host=localhost;dbname=test', 'username');
359357
360- $mutex = new PgAdvisoryLockMutex ($pdo, 'balance');
358+ $mutex = new PostgreSQLMutex ($pdo, 'balance');
361359$mutex->synchronized(function () use ($bankAccount, $amount) {
362360 $balance = $bankAccount->getBalance();
363361 $balance -= $amount;
0 commit comments