<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 18 Jun 2013 17:14:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Nikita Popov: Cooperative multitasking using coroutines (in PHP!) ]]></title>
      <guid>http://www.phpdeveloper.org/news/18941</guid>
      <link>http://www.phpdeveloper.org/news/18941</link>
      <description><![CDATA[<p>
<i>Nikita Popov</i> has a new post to his blog about a new feature that will be coming in PHP 5.5 and <a href="http://nikic.github.com/2012/12/22/Cooperative-multitasking-using-coroutines-in-PHP">how to use them</a>, coroutines and generators, in an example application.
</p>
<blockquote>
Coroutines on the other hand have received relatively little attention. The reason is that coroutines are both a lot more powerful and a lot harder to understand and explain. In this article I'd like to guide you through an implementation of a task scheduler using coroutines, so you can get a feeling for the stuff that they allow you to do. I'll start off with a few introductory sections. If you feel like you already got a good grasp of the basics behind generators and coroutines, then you can jump straight to the "Cooperative multitasking" section.
</blockquote>
<p>
He starts with a look at generators, a piece of functionality that will allow PHP to, for example, more easily create iterators "on the fly." He then moves on to coroutines, added functions that you have two-way communication with generators instead of just pulling data from them. With the basics out of the way, he gets into the "cooperative multitasking" and a sample socket-based server he implements using some of the concepts. 
</p>]]></description>
      <pubDate>Mon, 24 Dec 2012 09:46:36 -0600</pubDate>
    </item>
  </channel>
</rss>
