<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>「淺談coroutine與gevent」的迴響</title>
	<atom:link href="http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/</link>
	<description>Victor&#039;s個人部落格，關於程式設計與小提琴</description>
	<lastBuildDate>Fri, 10 Feb 2012 08:55:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>由：hookits</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-48319</link>
		<dc:creator>hookits</dc:creator>
		<pubDate>Tue, 17 Jan 2012 03:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-48319</guid>
		<description>pep 380完成了，python原生的coroutine。

改天介紹一下啊</description>
		<content:encoded><![CDATA[<p>pep 380完成了，python原生的coroutine。</p>
<p>改天介紹一下啊</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Coroutine/Generator/Iterator &#171; Abner&#8217;s Postgraduate Days</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-34006</link>
		<dc:creator>Coroutine/Generator/Iterator &#171; Abner&#8217;s Postgraduate Days</dc:creator>
		<pubDate>Wed, 28 Sep 2011 01:44:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-34006</guid>
		<description>[...] 淺談coroutine與gevent » 程式設計 遇上 小提琴  Advertisement   Eco World Content From Across The Internet.    [...]</description>
		<content:encoded><![CDATA[<p>[...] 淺談coroutine與gevent » 程式設計 遇上 小提琴  Advertisement   Eco World Content From Across The Internet.    [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：[Python] quick survey of asynchronous frameworks &#171; 軟件開發原始人的進化史</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-4127</link>
		<dc:creator>[Python] quick survey of asynchronous frameworks &#171; 軟件開發原始人的進化史</dc:creator>
		<pubDate>Tue, 26 Oct 2010 08:42:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-4127</guid>
		<description>[...] 淺談coroutine與gevent [...]</description>
		<content:encoded><![CDATA[<p>[...] 淺談coroutine與gevent [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Jun Wang</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3803</link>
		<dc:creator>Jun Wang</dc:creator>
		<pubDate>Fri, 03 Sep 2010 10:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3803</guid>
		<description>看完樓主寫的博客之後，虎軀一震，菊花一緊，很快理解了。。太感謝了。</description>
		<content:encoded><![CDATA[<p>看完樓主寫的博客之後，虎軀一震，菊花一緊，很快理解了。。太感謝了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：GuoJing</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3784</link>
		<dc:creator>GuoJing</dc:creator>
		<pubDate>Wed, 01 Sep 2010 06:33:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3784</guid>
		<description>好文章，这个不错，醍醐灌顶啊。</description>
		<content:encoded><![CDATA[<p>好文章，这个不错，醍醐灌顶啊。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：victor</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3610</link>
		<dc:creator>victor</dc:creator>
		<pubDate>Tue, 20 Jul 2010 05:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3610</guid>
		<description>@Jacky

Indeed, the main thread doesn&#039;t know which tasklets are blocked for IO event.  The back-end of gevent is libevent, there is a greenlet named Hub which runs the event loop.  You can find the Hub.run here:

http://bitbucket.org/denis/gevent/src/tip/gevent/hub.py

Every IO function in gevent, use some methods like core.read_event to register a callback and switch back to the hub by get_hub().switch(), namely, fall back to the event iteration. When the IO event is done, then switch back to original tasklet and continue its task. It works just like event-driven network model, but with additional coroutine feature.

It is possible to mark greenlet as halted, but it is not necessary, libevent knows nothing about coroutine.  But however, you can implement your scheduling model if you like to :)</description>
		<content:encoded><![CDATA[<p>@Jacky</p>
<p>Indeed, the main thread doesn&#8217;t know which tasklets are blocked for IO event.  The back-end of gevent is libevent, there is a greenlet named Hub which runs the event loop.  You can find the Hub.run here:</p>
<p><a href="http://bitbucket.org/denis/gevent/src/tip/gevent/hub.py" rel="nofollow">http://bitbucket.org/denis/gevent/src/tip/gevent/hub.py</a></p>
<p>Every IO function in gevent, use some methods like core.read_event to register a callback and switch back to the hub by get_hub().switch(), namely, fall back to the event iteration. When the IO event is done, then switch back to original tasklet and continue its task. It works just like event-driven network model, but with additional coroutine feature.</p>
<p>It is possible to mark greenlet as halted, but it is not necessary, libevent knows nothing about coroutine.  But however, you can implement your scheduling model if you like to :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Jacky</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3609</link>
		<dc:creator>Jacky</dc:creator>
		<pubDate>Mon, 19 Jul 2010 10:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3609</guid>
		<description>so, the key point is, does the &quot;main_thread&quot; know that the tasklet is halted on IO?</description>
		<content:encoded><![CDATA[<p>so, the key point is, does the "main_thread" know that the tasklet is halted on IO?</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：lipingtababa</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3608</link>
		<dc:creator>lipingtababa</dc:creator>
		<pubDate>Mon, 19 Jul 2010 06:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3608</guid>
		<description>好文章啊,我终于明白python的yield的用处了.能保存状态供下次使用 :)
之前看那些用yield做循环的例子,总觉得这是一个多余的key word</description>
		<content:encoded><![CDATA[<p>好文章啊,我终于明白python的yield的用处了.能保存状态供下次使用 :)<br />
之前看那些用yield做循环的例子,总觉得这是一个多余的key word</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Some reminiscences, some memories &#187; Blog Archive &#187; Web编程异步模型的 Gearman 实现（残）</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3606</link>
		<dc:creator>Some reminiscences, some memories &#187; Blog Archive &#187; Web编程异步模型的 Gearman 实现（残）</dc:creator>
		<pubDate>Sun, 18 Jul 2010 06:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3606</guid>
		<description>[...] 好吧，终于有人撰文，正好可以补充完整这个异步思路： 淺談coroutine與gevent [...]</description>
		<content:encoded><![CDATA[<p>[...] 好吧，终于有人撰文，正好可以补充完整这个异步思路： 淺談coroutine與gevent [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：mikespook</title>
		<link>http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/comment-page-1/#comment-3605</link>
		<dc:creator>mikespook</dc:creator>
		<pubDate>Sun, 18 Jul 2010 06:24:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=1068#comment-3605</guid>
		<description>好文，正好补充了之前异步 web 开发的一个设想的实现：
http://www.mikespook.com/index.php?s=Web%E7%BC%96%E7%A8%8B%E5%BC%82%E6%AD%A5%E6%A8%A1%E5%9E%8B</description>
		<content:encoded><![CDATA[<p>好文，正好补充了之前异步 web 开发的一个设想的实现：<br />
<a href="http://www.mikespook.com/index.php?s=Web%E7%BC%96%E7%A8%8B%E5%BC%82%E6%AD%A5%E6%A8%A1%E5%9E%8B" rel="nofollow">http://www.mikespook.com/index.php?s=Web%E7%BC%96%E7%A8%8B%E5%BC%82%E6%AD%A5%E6%A8%A1%E5%9E%8B</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

