Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 664f50a

Browse filesBrowse files
committed
Rename expirable into expiring
1 parent d50d516 commit 664f50a
Copy full SHA for 664f50a

File tree

1 file changed

+18
-18
lines changed
Filter options

1 file changed

+18
-18
lines changed

‎components/lock.rst

Copy file name to clipboardExpand all lines: components/lock.rst
+18-18Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ you can decorate it with the ``RetryTillSaveStore``.
8787
8888
$lock->acquire(true);
8989
90-
Expirable Locks
90+
Expiring Locks
9191
---------------
9292

9393
Working with a remote ``Store`` is hard. There is now way for the remote
@@ -96,12 +96,12 @@ Due to bugs, fatal errors or segmentation fault, we can't guarantee that the
9696
``release()`` method will be called, which would cause a ``resource`` to be locked
9797
infinitely.
9898

99-
To fill this gap, the remote ``Stores`` provide an expirable mechanism: The lock
100-
is acquired for a defined amount of time (named TTL for Time To Live).
99+
To fill this gap, the remote ``Stores`` provide an expiration mechanism: The
100+
lock is acquired for a defined amount of time (named TTL for Time To Live).
101101
When the timeout occurred, the lock is automatically released even if the locker
102102
don't call the ``release()`` method.
103103

104-
That's why, when you create a lock on an expirable ``Store``. You have to choose
104+
That's why, when you create a lock on an expiring ``Store``. You have to choose
105105
carefully the correct TTL. When too low, you take the risk to "lose" the lock
106106
(and someone else acquire it) whereas you don't finish your task.
107107
When too high and the process crash before you call the ``release()`` method,
@@ -126,7 +126,7 @@ the ``resource`` will stay lock till the timeout.
126126
.. tip::
127127

128128
To avoid letting the Lock in a locking state, try to always release an
129-
expirable lock by wrapping the job in a try/catch block for instance.
129+
expiring lock by wrapping the job in a try/catch block for instance.
130130

131131
When you have to work on a really long task, you should not set the TTL to
132132
overlap the duration of this task. Instead, the Lock Component expose a
@@ -162,22 +162,22 @@ This component provides several adapters ready to use in your applications.
162162

163163
Here is a small summary of available ``Stores`` and their capabilities.
164164

165-
+----------------------------------------------+--------+----------+-----------+
166-
| Store | Scope | Blocking | Expirable |
167-
+==============================================+========+==========+===========+
168-
| :ref:`FlockStore <lock-store-flock>` | local | yes | no |
169-
+----------------------------------------------+--------+----------+-----------+
170-
| :ref:`MemcachedStore <lock-store-memcached>` | remote | no | yes |
171-
+----------------------------------------------+--------+----------+-----------+
172-
| :ref:`RedisStore <lock-store-redis>` | remote | no | yes |
173-
+----------------------------------------------+--------+----------+-----------+
174-
| :ref:`SemaphoreStore <lock-store-semaphore>` | local | yes | no |
175-
+----------------------------------------------+--------+----------+-----------+
165+
+----------------------------------------------+--------+----------+----------+
166+
| Store | Scope | Blocking | Expiring |
167+
+==============================================+========+==========+==========+
168+
| :ref:`FlockStore <lock-store-flock>` | local | yes | no |
169+
+----------------------------------------------+--------+----------+----------+
170+
| :ref:`MemcachedStore <lock-store-memcached>` | remote | no | yes |
171+
+----------------------------------------------+--------+----------+----------+
172+
| :ref:`RedisStore <lock-store-redis>` | remote | no | yes |
173+
+----------------------------------------------+--------+----------+----------+
174+
| :ref:`SemaphoreStore <lock-store-semaphore>` | local | yes | no |
175+
+----------------------------------------------+--------+----------+----------+
176176

177177
.. tip::
178178

179179
Calling the :method:`Symfony\\Component\\Lock\\LockInterface::refresh`
180-
method on a Lock created from a non expirable ``Store`` like
180+
method on a Lock created from a non expiring ``Store`` like
181181
:ref:`FlockStore <lock-store-flock>` will do nothing.
182182

183183
.. _lock-store-flock:
@@ -257,7 +257,7 @@ classes::
257257
SemaphoreStore
258258
~~~~~~~~~~~~~~
259259

260-
The SemaphoreStore uses the PHP semaphore function to lock a ``resources``.
260+
The SemaphoreStore uses the PHP semaphore functions to lock a ``resources``.
261261

262262
.. code-block:: php
263263

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.