Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89688 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48265 invoked from network); 7 Dec 2015 07:06:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2015 07:06:08 -0000 Authentication-Results: pb1.pair.com header.from=hufeng1987@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=hufeng1987@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.175 as permitted sender) X-PHP-List-Original-Sender: hufeng1987@gmail.com X-Host-Fingerprint: 209.85.213.175 mail-ig0-f175.google.com Received: from [209.85.213.175] ([209.85.213.175:32808] helo=mail-ig0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/6A-55814-FDF25665 for ; Mon, 07 Dec 2015 02:06:07 -0500 Received: by igcmv3 with SMTP id mv3so72922729igc.0 for ; Sun, 06 Dec 2015 23:06:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/Twsx+lNYQTtjheus2pHHVf79URfFPtV5R/HF/oxMSk=; b=hnfPEhvw2WbqdjkF35rHGceNHKkWiJ736XAaY355c4dpFDlzM4oBw2W/vatNr5t/tb L3UKnkXi2URau2l3uYhqEJkAj8w/ivbCsR/s/5yBNU5ho5R+0xK5z2dFWsFnFW3dqApg 50cGktHLTVxnzvc83kTfSL7B4g3GZoqW9Gg6A4YQMUl7+f1k7EBaSewvFgEM92W/zTxz YO00sFrVn3kModZht+Csz+UYdK5p4A4WRGbSBFD4pS4e4QAyAjIX663z1SFPWDi7Nbrd knkRe0tAtRJE7918i3LncEth4UJnIsV8i3qsAT19FPZey9ASd+RCdgq5ayCkmCKGYaRC QTOg== X-Received: by 10.51.17.34 with SMTP id gb2mr14339615igd.45.1449471964664; Sun, 06 Dec 2015 23:06:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.104.71 with HTTP; Sun, 6 Dec 2015 23:05:45 -0800 (PST) Date: Mon, 7 Dec 2015 15:05:45 +0800 Message-ID: To: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Why PHP 7 yield from still single thread and blocking thread? From: hufeng1987@gmail.com (Netroby) As the RFC said. https://wiki.php.net/rfc/generator-delegation The defining feature of Generator functions is their support for suspending execution for later resumption. This capability gives applications a mechanism to implement asynchronous and concurrent architectures even in a traditionally single-threaded language like PHP. With simple userland task scheduling systems interleaved generators become lightweight threads of execution for concurrent processing tasks. I wrote a small test. to see if it really concurrent processing any tasks. the result looks bad. Still single blocking thread.