Re: [VOTE] True Async RFC 1.6

From: Date: Mon, 24 Nov 2025 17:09:00 +0000
Subject: Re: [VOTE] True Async RFC 1.6
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-129442@lists.php.net to get a copy of this message
> Just a plug / reminder that Joe Watkins already wrote a parallel code

Library **parallel** uses a trick to run code in another thread. It
clones the function’s opcodes, including the static vars, which is a
known PHP Engine behavior. In this case, the function runs inside a
completely separate Zend VM.

For true parallelism, the following changes are needed:

1. Shared opcodes
2. A new memory allocator
3. A new GC similar to Go’s
4. Virtual threads (what FrankenPHP is doing now)
5. Possibly something else…

Before starting the TrueAsync project, I tried to consider the
possibility of implementing full parallelism, but ultimately I
assessed the implementation cost as “impossible.”
In addition, pure parallelism does not provide more performance (and
sometimes even performs worse) for a web server than concurrency.


Thread (106 messages)

« previous php.internals (#129442) next »