Preliminary vote #18
Replies: 5 comments 18 replies
-
|
is there a doc we can see to clarify specifics on these points? for example, |
Beta Was this translation helpful? Give feedback.
-
|
Well done, hope Single-threaded coroutines can quickly support Laravel. Many people are looking forward to using it soon |
Beta Was this translation helpful? Give feedback.
-
|
Group members engaged in extensive discussions about the content and the poll, and also made their choices in the poll. Meanwhile, some members suggested: why not develop a CLI (Channel for Access to Services)? |
Beta Was this translation helpful? Give feedback.
-
|
The discussion doesn't state the goal or purpose of the proposed change. Is it only for legacy applications to run concurrently in a single PHP process? Is it to improve performance or purely for convenience? How do the proposed features compare to e.g. Threads? If purely for convenience,
This strategy provides very little isolation, as global variables are not the only global state in a process: Changes to the autoloader, error handler, ini settings, symbols (constants, functions, classes), persistent resources/connections, static class properties, static local variables, etc, in a request will affect all other requests. Code that temporarily change the error handler or ini settings will break, if context switches are allowed during the temporary change. Also, fatal errors (including memory limit) and exit() in a request will kill all other requests. Does it increase the cost of context switches between coroutines?
This seems similar to Threads, and provides full isolation. I would vote for this strategy, but it may be better to have a clearly separate API for this rather than reusing the coroutine API. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you to everyone who participated in the vote. Taking into account the arguments for and against, the feature with GLOBALS isolation will be postponed. The two main arguments behind this decision are:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This post represents a preliminary vote on the features that will be included in the next TrueAsync RFC 2.0.
I suggest that everyone who is interested vote explicitly by posting here in favor or against.
You can also review the research that was conducted on WordPress and Laravel as stateful applications:
Also: Two dev strategy
The following is proposed:
Single-threaded coroutines:
$GLOBALS.Multithreaded version:
3. Coroutines are explicitly created in a separate thread via a dedicated function. Such coroutines will not automatically migrate between PHP VMs/threads like in Go. Passing objects into such coroutines will follow the Shared Nothing principle.
In the future, the possibility of implementing multithreaded coroutines like in Go.
52 votes ·
Beta Was this translation helpful? Give feedback.
All reactions