Skip to content

Commit 3717fa6

Browse files
committed
minor #8845 [Lock] Add an auto release tips (jderusse, javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- [Lock] Add an auto release tips Commits ------- beb9a6e Reword 69bdba4 Add the auto release tips
2 parents 192a270 + beb9a6e commit 3717fa6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/lock.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ method can be safely called repeatedly, even if the lock is already acquired.
6262
to be used by several services, they should share the same ``Lock`` instance
6363
returned by the ``Factory::createLock`` method.
6464

65+
.. tip::
66+
67+
If you don't release the lock explicitly, it will be released automatically
68+
on instance destruction. In some cases, it can be useful to lock a resource
69+
across several requests. To disable the automatic release behavior, set the
70+
third argument of the ``createLock()`` method to ``false``.
71+
6572
Blocking Locks
6673
--------------
6774

0 commit comments

Comments
 (0)