<?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: Fibers &amp; Cooperative Scheduling in Ruby</title>
	<atom:link href="http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Mon, 15 Mar 2010 07:34:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ruby 1.9.x Concurrency &#124; keyongtech</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-198055</link>
		<dc:creator>Ruby 1.9.x Concurrency &#124; keyongtech</dc:creator>
		<pubDate>Tue, 09 Jun 2009 08:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-198055</guid>
		<description>[...] in filling in the missing pieces for me, may be helpful if you have the same missing piece :)  http://www.igvita.com/2009/05/13/fib...uling-in-ruby/  Regards,  [...]</description>
		<content:encoded><![CDATA[<p>[...] in filling in the missing pieces for me, may be helpful if you have the same missing piece :)  <a href="http://www.igvita.com/2009/05/13/fib...uling-in-ruby/" rel="nofollow">http://www.igvita.com/2009/05/13/fib&#8230;uling-in-ruby/</a>  Regards,  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Morgan</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-196642</link>
		<dc:creator>William Morgan</dc:creator>
		<pubDate>Tue, 02 Jun 2009 01:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-196642</guid>
		<description>There are significant differences between the two. Fibers are non-preemptive threads; continuations are fancy gotos. You can implement fibers with continuations, but there's no way to implement continuations with fibers. I've outlined some of the differences, with examples, &lt;a href="http://all-thing.net/fibers" rel="nofollow"&gt;here&lt;/a&gt; and given an implementation of fibers &lt;a&gt;here&lt;/a&gt;. Comments welcome.</description>
		<content:encoded><![CDATA[<p>There are significant differences between the two. Fibers are non-preemptive threads; continuations are fancy gotos. You can implement fibers with continuations, but there&#8217;s no way to implement continuations with fibers. I&#8217;ve outlined some of the differences, with examples, <a href="http://all-thing.net/fibers" rel="nofollow">here</a> and given an implementation of fibers <a>here</a>. Comments welcome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-196602</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Mon, 01 Jun 2009 22:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-196602</guid>
		<description>William, I may be misunderstanding your interpretation, but I do think that both concepts are very similar. For example, the semantics around multiple executions of a fiber is limited strictly to the code inside of it - it could exit after one loop, yield, or go back to the top (in which case, it sounds like a generator). Likewise, continuation code can be easily wrapped inside a loop inside to provide similar semantics. 

Bottom line is, I think the line between both concepts is so murky in Ruby that I would interpret them as functionally the same (even if there are theoretical differences).</description>
		<content:encoded><![CDATA[<p>William, I may be misunderstanding your interpretation, but I do think that both concepts are very similar. For example, the semantics around multiple executions of a fiber is limited strictly to the code inside of it - it could exit after one loop, yield, or go back to the top (in which case, it sounds like a generator). Likewise, continuation code can be easily wrapped inside a loop inside to provide similar semantics. </p>
<p>Bottom line is, I think the line between both concepts is so murky in Ruby that I would interpret them as functionally the same (even if there are theoretical differences).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Morgan</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-196371</link>
		<dc:creator>William Morgan</dc:creator>
		<pubDate>Sun, 31 May 2009 20:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-196371</guid>
		<description>I don't think continuations and fibers really are the same thing. Please correct me if I'm wrong. A continuation can be captured once, resumed many times, and each time the captured call stack is reinstated, but the heap state is not changed (i.e. it's shared between successive invocations).

A fiber can be resumed multiple times, but the call stack upon resumption is wherever the fiber last yielded, not where it was originally started. And the heap state is restored for fibers, unlike continuations. And continuations don't even have a notion of yielding.

It sounds like they may both share a lot of underlying implementation in Ruby 1.9, but the operational semantics are fairly different.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think continuations and fibers really are the same thing. Please correct me if I&#8217;m wrong. A continuation can be captured once, resumed many times, and each time the captured call stack is reinstated, but the heap state is not changed (i.e. it&#8217;s shared between successive invocations).</p>
<p>A fiber can be resumed multiple times, but the call stack upon resumption is wherever the fiber last yielded, not where it was originally started. And the heap state is restored for fibers, unlike continuations. And continuations don&#8217;t even have a notion of yielding.</p>
<p>It sounds like they may both share a lot of underlying implementation in Ruby 1.9, but the operational semantics are fairly different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-194744</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Sat, 23 May 2009 14:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-194744</guid>
		<description>Rtaljun, thanks for the catch, updated the link!</description>
		<content:encoded><![CDATA[<p>Rtaljun, thanks for the catch, updated the link!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rtaljun</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-194620</link>
		<dc:creator>rtaljun</dc:creator>
		<pubDate>Sat, 23 May 2009 04:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-194620</guid>
		<description>Very cool article! I didn't realize the parallels between continuations and fibers earlier.

The link to "implementation of Futures in Ruby" is broken, I believe?</description>
		<content:encoded><![CDATA[<p>Very cool article! I didn&#8217;t realize the parallels between continuations and fibers earlier.</p>
<p>The link to &#8220;implementation of Futures in Ruby&#8221; is broken, I believe?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-193955</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Mon, 18 May 2009 22:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-193955</guid>
		<description>Vidar, you should take a look at mysqlplus gem then!

Xabriel, not sure what you mean by unsafe. The upside of Fibers is that you're doing your own scheduling.. in which case, yes it is possible that your code never yields. Having said that, that's your own mistake. ;-)</description>
		<content:encoded><![CDATA[<p>Vidar, you should take a look at mysqlplus gem then!</p>
<p>Xabriel, not sure what you mean by unsafe. The upside of Fibers is that you&#8217;re doing your own scheduling.. in which case, yes it is possible that your code never yields. Having said that, that&#8217;s your own mistake. ;-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xabriel</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-193916</link>
		<dc:creator>Xabriel</dc:creator>
		<pubDate>Mon, 18 May 2009 12:04:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-193916</guid>
		<description>Correct me if I'm wrong, but isn't this concept of 'Fibers' inherently unsafe? (I.e. What if the Fiber never yields?)</description>
		<content:encoded><![CDATA[<p>Correct me if I&#8217;m wrong, but isn&#8217;t this concept of &#8216;Fibers&#8217; inherently unsafe? (I.e. What if the Fiber never yields?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vidar Hokstad</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-193908</link>
		<dc:creator>Vidar Hokstad</dc:creator>
		<pubDate>Mon, 18 May 2009 08:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-193908</guid>
		<description>Ilya,

Oh, I agree there's lots of horrible 3rd party extensions, and native gems too.... My pet hate used to be the MySQL lib, which thanks to the braindead C client library just plain couldn't schedule properly.</description>
		<content:encoded><![CDATA[<p>Ilya,</p>
<p>Oh, I agree there&#8217;s lots of horrible 3rd party extensions, and native gems too&#8230;. My pet hate used to be the MySQL lib, which thanks to the braindead C client library just plain couldn&#8217;t schedule properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fibras: 8 leituras úteis sobre a nova funcionalidade de concorrência do Ruby</title>
		<link>http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/comment-page-1/#comment-193810</link>
		<dc:creator>Fibras: 8 leituras úteis sobre a nova funcionalidade de concorrência do Ruby</dc:creator>
		<pubDate>Sun, 17 May 2009 02:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/?p=455#comment-193810</guid>
		<description>[...] Fibers &amp; Cooperative Scheduling in Ruby - Ilya Grigorik escreveu talvez a melhor visão geral sobre o assunto. Incluindo um ótimo diagrama, um código de exemplo e uma olhada em como o JRuby e o Rubinius se comparam. Se você só puder ler um artigo, que seja este. [...]</description>
		<content:encoded><![CDATA[<p>[...] Fibers &amp; Cooperative Scheduling in Ruby - Ilya Grigorik escreveu talvez a melhor visão geral sobre o assunto. Incluindo um ótimo diagrama, um código de exemplo e uma olhada em como o JRuby e o Rubinius se comparam. Se você só puder ler um artigo, que seja este. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
