Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54395 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42654 invoked from network); 5 Aug 2011 01:54:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2011 01:54:29 -0000 Authentication-Results: pb1.pair.com header.from=xwisdom@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=xwisdom@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) X-PHP-List-Original-Sender: xwisdom@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:47740] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/84-08937-45D4B3E4 for ; Thu, 04 Aug 2011 21:54:29 -0400 Received: by fxe23 with SMTP id 23so28200fxe.29 for ; Thu, 04 Aug 2011 18:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=upbMo0WtMKgqVG9WYCUeiyyvoDni3FSUc+ndkhX1/Qg=; b=bIsnj7eisw8LPFFDOdVtDlwpHy7HGH9KDBS3pDngo5v6B3dEDIVPJlzJyns33Ierqj QOQWzbjqYgKLajx/C3n+7PSB+1BxczZtbi7EvvvlqWmAAB0OrGlU9DrHjevSt7PUBNH3 lMmdTVOjQjXtnq31hgxkBFsOK3sVa8oh6YQnU= MIME-Version: 1.0 Received: by 10.204.170.193 with SMTP id e1mr508982bkz.315.1312509265984; Thu, 04 Aug 2011 18:54:25 -0700 (PDT) Received: by 10.204.157.19 with HTTP; Thu, 4 Aug 2011 18:54:25 -0700 (PDT) Date: Thu, 4 Aug 2011 20:54:25 -0500 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=bcaec52c661f903b3f04a9b8602e Subject: TameJS syntax for Async/Parallel execution in PHP From: xwisdom@gmail.com (Raymond Irving) --bcaec52c661f903b3f04a9b8602e Content-Type: text/plain; charset=ISO-8859-1 Hello, I came across this little library called TameJS (http://tamejs.org/) and fell in love with the it's syntax. This had me thinking if it was possible to add such features to a PHP CLI (or web app): fetchAll(); // do something here ?> The "await" keyword marks a section of code that depends on externals events, like network or disk activity, or a timer. An await block contains one or more calls to defer. I think the above syntax makes it easier to write asynchronous apps that can take advantage of multiple threads or processors What do you think? __ Raymond --bcaec52c661f903b3f04a9b8602e--