or take a look here: I think the threadpool code is the one you want but it&#39;s commented out right now<div><br></div><div><a href="http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/nails_engine.rb#L61">http://github.com/casualjim/ironnails/blob/master/IronNails/vendor/iron_nails/lib/nails_engine.rb#L61</a><br>

<div>---<br>Met vriendelijke groeten - Best regards - Salutations<br>Ivan Porto Carrero<br>GSM: +32.486.787.582<br>Blog: <a href="http://flanders.co.nz">http://flanders.co.nz</a><br>Twitter: <a href="http://twitter.com/casualjim">http://twitter.com/casualjim</a><br>

Author of IronRuby in Action (<a href="http://manning.com/carrero">http://manning.com/carrero</a>)<br><br>
<br><br><div class="gmail_quote">On Thu, Feb 11, 2010 at 2:08 PM, Mark Rendle <span dir="ltr">&lt;<a href="mailto:mark@markrendle.net">mark@markrendle.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Bassel,<div><br></div><div>Ruby provides its own support for asynchronous operations in its Thread class:</div><div><br></div><div>Thread.new do</div><div>  puts &quot;howdy!&quot;</div><div>end</div><div><br></div><div>


If you specifically need to run a .NET delegate asynchronously, you can call its invoke method within this structure:</div><div><br></div><div>Thread.new do</div><div>  my_action.invoke</div><div>end</div><div><br></div>

<div>
More info on Ruby&#39;s Thread class: <a href="http://corelib.rubyonrails.org/classes/Thread.html" target="_blank">http://corelib.rubyonrails.org/classes/Thread.html</a></div><div><br></div><div>Does that meet your needs?</div>

<div><br></div>
<div>Cheers,</div><div>Mark</div><div><div></div><div class="h5"><div><br><div class="gmail_quote">On Wed, Feb 10, 2010 at 11:25 PM, Bassel Samman <span dir="ltr">&lt;<a href="mailto:lists@ruby-forum.com" target="_blank">lists@ruby-forum.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello guys,<br>
    I&#39;d like to use asynchronous delegates, but it doesn&#39;t seem to work.<br>
The IronRuby website mentioned that I can do:<br>
<br>
______________________________________________________________________<br>
&gt;&gt;&gt; require &#39;System&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; require &#39;System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&#39;<br>
=&gt; true<br>
&gt;&gt;&gt; my_action = System::Action.new { puts &quot;Howdy!&quot; }<br>
=&gt; System.Action<br>
&gt;&gt;&gt; my_action.invoke<br>
&quot;Howdy!&quot;<br>
=&gt; nil<br>
______________________________________________________________________<br>
That works fine, but if I try this instead:<br>
<br>
______________________________________________________________________<br>
result = my_action.BeginInvoke(nil,nil)<br>
my_action.EndInvoke(result)<br>
______________________________________________________________________<br>
<br>
I get:<br>
<br>
System::NullReferenceException: Object reference not set to an instance<br>
of an object.<br>
<br>
<br>
Am I missing something, or is there another way to do asynchronous<br>
delegates in IR.<br>
<br>
Thanks in advance,<br>
<br>
Bassel<br>
<font color="#888888">--<br>
Posted via <a href="http://www.ruby-forum.com/" target="_blank">http://www.ruby-forum.com/</a>.<br>
_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org" target="_blank">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
</font></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Ironruby-core mailing list<br>
<a href="mailto:Ironruby-core@rubyforge.org">Ironruby-core@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/ironruby-core" target="_blank">http://rubyforge.org/mailman/listinfo/ironruby-core</a><br>
<br></blockquote></div><br></div></div>