@@ -46,7 +46,7 @@ method will try to acquire the lock::
46
46
47
47
if ($lock->acquire()) {
48
48
// The resource "pdf-invoice-generation" is locked.
49
- // You can compute and generate invoice safely here.
49
+ // You can compute and generate the invoice safely here.
50
50
51
51
$lock->release();
52
52
}
@@ -65,7 +65,7 @@ method can be safely called repeatedly, even if the lock is already acquired.
65
65
.. tip ::
66
66
67
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
68
+ upon instance destruction. In some cases, it can be useful to lock a resource
69
69
across several requests. To disable the automatic release behavior, set the
70
70
third argument of the ``createLock() `` method to ``false ``.
71
71
@@ -74,7 +74,7 @@ Serializing Locks
74
74
75
75
The ``Key `` contains the state of the ``Lock `` and can be serialized. This
76
76
allows the user to begin a long job in a process by acquiring the lock, and
77
- continue the job in an other process using the same lock::
77
+ continue the job in another process using the same lock::
78
78
79
79
use Symfony\Component\Lock\Key;
80
80
use Symfony\Component\Lock\Lock;
@@ -210,7 +210,7 @@ as seconds) and ``isExpired()`` (which returns a boolean).
210
210
Automatically Releasing The Lock
211
211
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212
212
213
- Lock are automatically released when their Lock objects are destructed. This is
213
+ Locks are automatically released when their Lock objects are destructed. This is
214
214
an implementation detail that will be important when sharing Locks between
215
215
processes. In the example below, ``pcntl_fork() `` creates two processes and the
216
216
Lock will be released automatically as soon as one process finishes::
@@ -688,11 +688,11 @@ FlockStore
688
688
~~~~~~~~~~
689
689
690
690
By using the file system, this ``Store `` is reliable as long as concurrent
691
- processes use the same physical directory to stores locks.
691
+ processes use the same physical directory to store locks.
692
692
693
693
Processes must run on the same machine, virtual machine or container.
694
- Be careful when updating a Kubernetes or Swarm service because for a short
695
- period of time, there can be two running containers in parallel.
694
+ Be careful when updating a Kubernetes or Swarm service because, for a short
695
+ period of time, there can be two containers running in parallel.
696
696
697
697
The absolute path to the directory must remain the same. Be careful of symlinks
698
698
that could change at anytime: Capistrano and blue/green deployment often use
@@ -704,7 +704,7 @@ Some file systems (such as some types of NFS) do not support locking.
704
704
.. caution ::
705
705
706
706
All concurrent processes must use the same physical file system by running
707
- on the same machine and using the same absolute path to locks directory.
707
+ on the same machine and using the same absolute path to the lock directory.
708
708
709
709
By definition, usage of ``FlockStore `` in an HTTP context is incompatible
710
710
with multiple front servers, unless to ensure that the same resource will
@@ -726,7 +726,7 @@ MemcachedStore
726
726
727
727
The way Memcached works is to store items in memory. That means that by using
728
728
the :ref: `MemcachedStore <lock-store-memcached >` the locks are not persisted
729
- and may disappear by mistake at anytime .
729
+ and may disappear by mistake at any time .
730
730
731
731
If the Memcached service or the machine hosting it restarts, every lock would
732
732
be lost without notifying the running processes.
@@ -803,7 +803,7 @@ The PdoStore relies on the `ACID`_ properties of the SQL engine.
803
803
.. caution ::
804
804
805
805
In a cluster configured with multiple primaries, ensure writes are
806
- synchronously propagated to every nodes , or always use the same node.
806
+ synchronously propagated to every node , or always use the same node.
807
807
808
808
.. caution ::
809
809
@@ -838,7 +838,7 @@ RedisStore
838
838
839
839
The way Redis works is to store items in memory. That means that by using
840
840
the :ref: `RedisStore <lock-store-redis >` the locks are not persisted
841
- and may disappear by mistake at anytime .
841
+ and may disappear by mistake at any time .
842
842
843
843
If the Redis service or the machine hosting it restarts, every locks would
844
844
be lost without notifying the running processes.
@@ -865,7 +865,7 @@ removed by mistake.
865
865
CombinedStore
866
866
~~~~~~~~~~~~~
867
867
868
- Combined stores allow to store locks across several backends. It's a common
868
+ Combined stores allow the storage of locks across several backends. It's a common
869
869
mistake to think that the lock mechanism will be more reliable. This is wrong.
870
870
The ``CombinedStore `` will be, at best, as reliable as the least reliable of
871
871
all managed stores. As soon as one managed store returns erroneous information,
0 commit comments