<?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>Comments on: trying to grok greenlets &#8211; more experiments in concurrent programming</title>
	<atom:link href="http://www.rhonabwy.com/wp/2007/12/01/trying-to-grok-greenlets-more-experiments-in-concurrent-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rhonabwy.com/wp/2007/12/01/trying-to-grok-greenlets-more-experiments-in-concurrent-programming/</link>
	<description>Mac OS X, iPhone, Tech, and daily life in Seattle</description>
	<lastBuildDate>Fri, 12 Mar 2010 14:22:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: denis</title>
		<link>http://www.rhonabwy.com/wp/2007/12/01/trying-to-grok-greenlets-more-experiments-in-concurrent-programming/comment-page-1/#comment-86194</link>
		<dc:creator>denis</dc:creator>
		<pubDate>Wed, 04 Mar 2009 08:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.rhonabwy.com/wp/2007/12/01/trying-to-grok-greenlets-more-experiments-in-concurrent-programming/#comment-86194</guid>
		<description>why it does not work is because Queue and greenlets aren&#039;t designed to work together.
All your greenlets, in fact, run in the same thread, so when messageQueue.get() blocks
because the queue is empty it blocks every other greenlet you have, giving your program
no chance to put something in the queue.

in eventlet, there&#039;s coros.queue that works as expected. however, with eventlet, you don&#039;t create greenlets
directly and switch() between them, instead you spawn() them (which is quite easy) and use
communication primitives  provided by eventlet, classes like coros.queue, coros.event.

and btw, use this eventlet
http://devel.ag-projects.com/~denis/cgi-bin/hgweb.cgi
it&#039;s the most stable eventlet available at this point.</description>
		<content:encoded><![CDATA[<p>why it does not work is because Queue and greenlets aren&#8217;t designed to work together.<br />
All your greenlets, in fact, run in the same thread, so when messageQueue.get() blocks<br />
because the queue is empty it blocks every other greenlet you have, giving your program<br />
no chance to put something in the queue.</p>
<p>in eventlet, there&#8217;s coros.queue that works as expected. however, with eventlet, you don&#8217;t create greenlets<br />
directly and switch() between them, instead you spawn() them (which is quite easy) and use<br />
communication primitives  provided by eventlet, classes like coros.queue, coros.event.</p>
<p>and btw, use this eventlet<br />
<a href="http://devel.ag-projects.com/~denis/cgi-bin/hgweb.cgi" rel="nofollow">http://devel.ag-projects.com/~denis/cgi-bin/hgweb.cgi</a><br />
it&#8217;s the most stable eventlet available at this point.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
