Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88564 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45912 invoked from network); 29 Sep 2015 18:24:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 18:24:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:35020] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/38-05836-B47DA065 for ; Tue, 29 Sep 2015 14:24:12 -0400 Received: by wicge5 with SMTP id ge5so162946013wic.0 for ; Tue, 29 Sep 2015 11:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=PkGITtdXDkMQBaIdSg2w/AVIyaBpyvg1mRJ0SY10QBk=; b=zDOOF1JB+fkTjGhge6Jc0023kgW+mOn8UvBBM1trWUdn9ZrRUom++RVobxYXwufvFV msE/kZ9zZXbBkoV/5Cjx9HwVEtJk4nIucULfWyo9Wlbwl+sVZoZfUc1IrPgugMKizpeA p80+jMcoJ0VHT0evTJL/SLFAzQdj6WOiSZLXZzY5Jby6UsBe107BoduRuo7hMBTkFEo+ MqbPAjyA/l/mcb4vbL+Po6RTRx6Qm5X3fdL4dRxUFtN2Yt1H1gWZH3ywmrUel/fQbOjA oktHce/mbqGW4k5repDiJqgQtA61bkxD8EzWOmaWNFIZ9xjLpbr45+0daDbpC9MxyLjy 1S4w== X-Received: by 10.180.186.98 with SMTP id fj2mr28488651wic.58.1443551049126; Tue, 29 Sep 2015 11:24:09 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by smtp.gmail.com with ESMTPSA id 12sm25215090wjw.15.2015.09.29.11.24.08 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Sep 2015 11:24:08 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <560AACB6.9080909@cubiclesoft.com> References: <56095A0C.4070306@cubiclesoft.com> <1443529244.15520.67.camel@kuechenschabe> <560AACB6.9080909@cubiclesoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Tue, 29 Sep 2015 19:24:04 +0100 To: PHP internals Message-ID: Subject: Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x? From: rowan.collins@gmail.com (Rowan Collins) 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 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. Regards, -- Rowan Collins [IMSoP]