Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88915 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89090 invoked from network); 22 Oct 2015 01:11:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2015 01:11:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:34374] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 22/54-55035-4C738265 for ; Wed, 21 Oct 2015 21:11:33 -0400 Received: by wikq8 with SMTP id q8so9063447wik.1 for ; Wed, 21 Oct 2015 18:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=jAPJPl0qvZ9sEu/n4eZ1asTLNKFmXV24fFBfa2M/wzM=; b=Aa6YcOs3IZnGrpP4afH3AldqzuwYUVhIB45Hbvp/et0Q3MSs8GRzwfI2pK3cnPMV32 pKcHecVPy1TPWtLRW8VgaiGuVj9d52WrEd5tmYG7QQ5QYvpQa1seetDVlnYIqrd8JzRi JUChcasrSkNppDOGnqJc9DeQpRYeSdWfvPrYa7kJ8hGi/RFbaPzlo64ABO8dyxarxZ9t Tk0A/7L7TpdLHR4ppzW8P2UyD6yNbHlq7neCIpMbWJ8NNS6y/9jQsSiawOEgbr5EdzbX lCqBdaCFVxduexvPHKib10SERtszMHxzRBA497Frqdr23JybcCMRc5/ShtMmxRYNKpCx m9yw== X-Received: by 10.194.19.169 with SMTP id g9mr13404715wje.64.1445476289450; Wed, 21 Oct 2015 18:11:29 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.194.7.105 with HTTP; Wed, 21 Oct 2015 18:10:50 -0700 (PDT) In-Reply-To: References: <56095A0C.4070306@cubiclesoft.com> <1443529244.15520.67.camel@kuechenschabe> <560AACB6.9080909@cubiclesoft.com> Date: Thu, 22 Oct 2015 03:10:50 +0200 X-Google-Sender-Auth: boJaA069C6mL9nsq-7fPkLNZFs0 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x? From: jpauli@php.net (Julien Pauli) On Tue, Sep 29, 2015 at 8:24 PM, Rowan Collins wr= ote: > On 29 September 2015 16:22:30 BST, Thomas Hruska 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 thread= s were nearly always time-slices on a single CPU core, but surely on a mode= rn system there can be real simultaneity, because even the cheapest laptop= has multiple CPU cores. An asynchronous approach is useful for cases of "d= o something else while I wait for this background task to complete", but se= ems 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