<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Christopher Bird &#187; concurrency</title>
	<atom:link href="http://www.christopherbird.co.uk/tag/concurrency/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christopherbird.co.uk</link>
	<description>Personal and professional blog</description>
	<lastBuildDate>Mon, 30 Aug 2010 12:17:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Retlang, some examples and explanations</title>
		<link>http://www.christopherbird.co.uk/2009/12/retlang-some-examples-and-explanations/</link>
		<comments>http://www.christopherbird.co.uk/2009/12/retlang-some-examples-and-explanations/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 22:45:16 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[concurrency]]></category>

		<guid isPermaLink="false">http://www.christopherbird.co.uk/?p=52</guid>
		<description><![CDATA[Last week I spent some time trying out the message based concurrency library Retlang in and effort speed up a portion of an application I&#8217;ve been working on. When picking up Retlang I found very few examples/explanations that were relevant to the current release (0.4.3.0). In the beginning Retlang is constructed of various channels that [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I spent some time trying out the message based concurrency library <a href="http://code.google.com/p/retlang/">Retlang</a> in and effort speed up a portion of an application I&#8217;ve been working on. When picking up Retlang I found very few examples/explanations that were relevant to the current release (0.4.3.0).</p>
<h3>In the beginning</h3>
<p>Retlang is constructed of various <strong>channels</strong> that can have messages <strong>published</strong> to them. A <strong>channel</strong> also has <strong>fibers subscribed</strong> to them with a delegate to a function that accept a message as a parameter. So create a channel, subscribe a fiber to it and publish your messages to the channel and the fiber will process them one after another leaving your program free to do other things, Simple yeah? not one thread, mutex, monitor or lock in sight, don&#8217;t believe me how about an example?</p>
<div class="codecolorer-container csharp vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var fiber <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; fiber<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var channel <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Channel<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; channel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span>fiber, <br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> WebServiceClient<span style="color: #008000;">.</span><span style="color: #0000FF;">SendString</span><span style="color: #008000;">&#40;</span>value<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp;<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; channel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;hello&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; channel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;world&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<h3>Talk to me!</h3>
<p>Ok so you might have noticed these published messages are asynchronous, you get nothing back. There are two solutions use the RequestReplyChannel instead of Channel which will process your message and wait for a response with each call. That&#8217;s gonna slow things down though, so instead we&#8217;ll publish the result on to another channel and pick them up after. Here goes&#8230;</p>
<div class="codecolorer-container csharp vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var requestFiber <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var responseFiber <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; requestFiber<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; responseFiber<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var requestChannel <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Channel<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var responseChannel <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Channel<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; requestFiber, <br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; responseChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>, value<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Contains</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;world&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var results <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; responseChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; responseFiber,<br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; results<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>value<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span>, <span style="color: #666666;">&quot;hello london&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">2</span>, <span style="color: #666666;">&quot;hello world&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<h3>You said concurrent</h3>
<p>Ok so the previous example used one fiber to find strings that contained the word &#8220;world&#8221; and another to collate them after. It&#8217;s hardly concurrent, still feels a bit sequential. In the example we can&#8217;t really add any concurrency to the collation of those responses, well not without locking that results list, plus that&#8217;s a very simple/fast operation anyway. What we can do is speed up the finding of the word &#8220;world&#8221; in strings because there is no shared state, that&#8217;s simple to do. The channel will allow you to subscribe as many fibers to it as you wish, only problem is every fiber will be called for each message. This doesn&#8217;t really do what we want, we&#8217;ll end up with many results for each message, what we really want is the first free fiber to process the next published message. Step in the QueueChannel which does just that, so same example but with more &#8220;fiber&#8221;!</p>
<div class="codecolorer-container csharp vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var requestFiber1 <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var requestFiber2 <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #0600FF; font-weight: bold;">using</span><span style="color: #008000;">&#40;</span>var responseFiber <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ThreadFiber<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; requestFiber1<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestFiber2<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; responseFiber<span style="color: #008000;">.</span><span style="color: #0000FF;">Start</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var requestChannel <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> QueueChannel<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var responseChannel <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Channel<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; requestFiber1, <br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; responseChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>, value<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Contains</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;world&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; requestFiber2, <br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; responseChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value<span style="color: #008000;">.</span><span style="color: #0000FF;">Key</span>, value<span style="color: #008000;">.</span><span style="color: #0000FF;">Value</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Contains</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;world&quot;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; var results <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&lt;</span>KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">bool</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; responseChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Subscribe</span><span style="color: #008000;">&#40;</span><br />
&nbsp; &nbsp; responseFiber,<br />
&nbsp; &nbsp; value <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; results<span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>value<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">1</span>, <span style="color: #666666;">&quot;hello london&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; requestChannel<span style="color: #008000;">.</span><span style="color: #0000FF;">Publish</span><span style="color: #008000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> KeyValuePair<span style="color: #008000;">&lt;</span><span style="color: #6666cc; font-weight: bold;">int</span>, <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">2</span>, <span style="color: #666666;">&quot;hello world&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<h3>Those threads are a bit heavy</h3>
<p>At the moment i&#8217;m using the ThreadFiber which maps down to a Thread. So for every ThreadFiber we&#8217;re creating new threads which is expensive so instead we might want to use the PoolFiber which uses the .Net ThreadPool to manage creation and reuse. It&#8217;s a very simple change to use the PoolFiber, just replace the ThreadFibers. The only difference between ThreadFiber and PoolFiber is that it will batch up a few messages to be processed in a single thread.</p>
<h3>Pause for breath</h3>
<p>This seems like a good place to stop for now. There are a few more things to cover in more detail like batch execution and some other things like customising execution but those can wait till another day.</p>
<h3>Updated</h3>
<p>I&#8217;ve updated the last to examples to solve a type typo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherbird.co.uk/2009/12/retlang-some-examples-and-explanations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
