File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,16 @@ Locks are used to guarantee exclusive access to some shared resource. In
29
29
Symfony applications, you can use locks for example to ensure that a command is
30
30
not executed more than once at the same time (on the same or different servers).
31
31
32
- In order to manage the state of locks, a ``Store `` needs to be created first
33
- and then use the :class: `Symfony\\ Component\\ Lock\\ Factory ` class to actually
34
- create the lock for some resource::
32
+ Locks are created using a :class: `Symfony\\ Component\\ Lock\\ Factory ` class,
33
+ which in turn requires another class to manage the storage of locks::
35
34
36
35
use Symfony\Component\Lock\Factory;
37
36
use Symfony\Component\Lock\Store\SemaphoreStore;
38
37
39
38
$store = new SemaphoreStore();
40
39
$factory = new Factory($store);
41
40
42
- The lock can be created by calling the :method: `Symfony\\ Component\\ Lock\\ Factory::createLock `
41
+ The lock is created by calling the :method: `Symfony\\ Component\\ Lock\\ Factory::createLock `
43
42
method. Its first argument is an arbitrary string that represents the locked
44
43
resource. Then, a call to the :method: `Symfony\\ Component\\ Lock\\ LockInterface::acquire `
45
44
method will try to acquire the lock::
You can’t perform that action at this time.
0 commit comments