This repository was archived by the owner on Jun 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -254,10 +254,9 @@ function fetchFirstSuccessful(string ...$apiHosts): string
254254}
255255```
256256
257-
258257### Implementation requirements
259258
260- The implementation of this ** RFC** should be carried out in a way that minimizes changes to the ** PHP** core.
259+ The implementation of this ** RFC** should be carried out in a way that minimizes changes to the ** PHP core** .
261260
262261The proposed changes include:
263262* syntax modifications to the language,
@@ -1938,6 +1937,14 @@ This illustrates the key idea of structured concurrency:
19381937tying the lifetime of child tasks to the scope that allocates resources.
19391938Both the child tasks and the resources must be cleaned up in a well-defined order.
19401939
1940+ Waiting for all child coroutines in a `Scope` is **a dangerous operation**,
1941+ as in the case of a **zombie coroutine**, memory and descriptor resources may be held indefinitely.
1942+ This approach is only acceptable in scenarios where the user can cancel the operation,
1943+ such as during the execution of **console commands**.
1944+
1945+ In the context of web server applications, you **should not** wait on a `Scope`
1946+ unless it is part of a **Supervisor** strategy.
1947+
19411948### Error detection
19421949
19431950Detecting erroneous situations when using coroutines is an important part of analyzing an application ' s reliability.
You can’t perform that action at this time.
0 commit comments