Skip to content

Commit d2a1c23

Browse files
committed
[#7159] some minor tweaks
1 parent 01ebdc3 commit d2a1c23

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

components/process.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,22 +126,23 @@ are done doing other stuff::
126126

127127
.. note::
128128

129-
If a ``Response`` is sent **before** what ``Process`` is running had a chance to complete,
130-
the server process will be killed (depending on your OS). It means that your task
131-
will be stopped right away. Running an asynchronous process is not the same than running
132-
a processing surviving yourselves.
129+
If a ``Response`` is sent **before** a child process had a chance to complete,
130+
the server process will be killed (depending on your OS). It means that
131+
your task will be stopped right away. Running an asynchronous process
132+
is not the same as running a process that survives it parent process.
133133

134-
If you want your process to survive the request/response cycle, you could take
135-
advantage of the ``kernel.terminate`` event, and run your command **synchronuously**
136-
inside this event. Be aware that ``kernel.terminate`` is called only if you run ``PHP-FPM``.
134+
If you want your process to survive the request/response cycle, you can
135+
take advantage of the ``kernel.terminate`` event, and run your command
136+
**synchronously** inside this event. Be aware that ``kernel.terminate``
137+
is called only if you use PHP-FPM.
137138

138139
.. caution::
139140

140-
Beware also that if you do that, the said php process won't available to serve
141-
any new request until the subprocess is finished, which means you can block your
142-
FPM pool quickly if you're not careful enough.
143-
That's why it generally way better to not do any fancy thing even after the request is sent
144-
but prefer using a job queue.
141+
Beware also that if you do that, the said PHP-FPM process will not be
142+
available to serve any new request until the subprocess is finished. This
143+
means you can quickly block your FPM pool if you're not careful enough.
144+
That is why it's generally way better not to do any fancy things even
145+
after the request is sent, but to use a job queue instead.
145146

146147
:method:`Symfony\\Component\\Process\\Process::wait` takes one optional argument:
147148
a callback that is called repeatedly whilst the process is still running, passing

0 commit comments

Comments
 (0)