Skip to content

Commit c45b8ff

Browse files
committed
minor #9516 [Lock] Fix documentation regarding createLock() method (julienfalque)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #9516). Discussion ---------- [Lock] Fix documentation regarding createLock() method Commits ------- 0760638 Fix documentation regarding createLock() method
2 parents d45c101 + 0760638 commit c45b8ff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/lock.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ create the lock for some resource::
3939
$store = new SemaphoreStore();
4040
$factory = new Factory($store);
4141

42-
Then, a call to the :method:`Symfony\\Component\\Lock\\LockInterface::acquire`
43-
method will try to acquire the lock. Its first argument is an arbitrary string
44-
that represents the locked resource::
42+
The lock can be created by calling the :method:`Symfony\\Component\\Lock\\Factory::createLock`
43+
method. Its first argument is an arbitrary string that represents the locked
44+
resource. Then, a call to the :method:`Symfony\\Component\\Lock\\LockInterface::acquire`
45+
method will try to acquire the lock::
4546

4647
// ...
4748
$lock = $factory->createLock('pdf-invoice-generation');

0 commit comments

Comments
 (0)