Re: async/await - is future reserved words in PHP 7.x?
| From: | Julien Pauli | Date: | Thu, 22 Oct 2015 01:10:50 +0000 |
| Subject: | Re: async/await - is future reserved words in PHP 7.x? | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88915@lists.php.net to get a copy of this message | ||
On Tue, Sep 29, 2015 at 8:24 PM, Rowan Collins <rowan.collins@gmail.com> wrote:
> On 29 September 2015 16:22:30 BST, Thomas Hruska <thruska@cubiclesoft.com> wrote:
>>On 9/29/2015 6:52 AM, Joe Watkins wrote:
>>> We shouldn't reserve words on a whim ...
>>>
>>> async/await doesn't solve any problems for multithreaded programming,
>>at
>>> all ... it solves problems for asynchronous programming, a different
>>> concept ... let's not confuse the two ...
>>
>>Actually, it does. Asynchronous and multithreaded programming are
>>attempts at solving the exact same problem: Simultaneously handling
>>multiple data streams in whatever form that takes whether that be
>>network, hard drive, random device XYZ, RAM, or even CPU. The former
>>says, "Let's wait until we can read or write and continue when we have
>>data." The latter says, "Let's read and write but let the OS handle
>>context switching to give the appearance of simultaneously handling
>>multiple data streams."
>
> That description may have held a few years ago, when processes and threads were nearly always
> time-slices on a single CPU core, but surely on a modern system there can be real simultaneity,
> because even the cheapest laptop has multiple CPU cores. An asynchronous approach is useful for
> cases of "do something else while I wait for this background task to complete", but seems
> less so for "do both of these things actively, using whatever resource is available".
>
> It may be that the first class of problem is more common, but that doesn't make the two
> equivalent.
Remember that discussion we had some years ago ? ;-)
Async IOs etc... some parts can still be found on the wiki
(https://wiki.php.net/ideas/php6/engine).
I hope we'll be able to collaborate about this subject for a PHP-Next,
like PHP 8.
Julien.P