Skip to content

[Lock] Add an auto release tips #8845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/lock.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ method can be safely called repeatedly, even if the lock is already acquired.
to be used by several services, they should share the same ``Lock`` instance
returned by the ``Factory::createLock`` method.

.. tip::

If you don't release the lock explicitly, it will be released automatically
on instance destruction. In some cases, it can be useful to lock a resource
across several requests. To disable the automatic release behavior, set the
third argument of the ``createLock()`` method to ``false``.

Blocking Locks
--------------

Expand Down