Hi everyone,<br><br>I have two workers, a connection_worker and an interface_worker, that I want to be able to call methods on each other. Initially I thought I could do this:<br><br>connection_worker<br>&nbsp; def alive?<br>&nbsp;&nbsp;&nbsp; return true<br>
&nbsp; end<br>end<br><br>interface_worker<br>&nbsp; def test_connection<br>&nbsp;&nbsp;&nbsp; if MiddleMan.worker(:connection_worker).alive?(true)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp; end<br>end<br><br>Obviously this is a somewhat contrived test but I was just trying to make sure everything worked. I use alive?(true) because, according to <a href="http://backgroundrb.rubyforge.org/rails/index.html">http://backgroundrb.rubyforge.org/rails/index.html</a>, passing true should cause the worker to wait for a result and return that result. Unfortunately that doesn&#39;t seem to be the cause: every time I run this method I get nil back from the connection_worker. I know that in this specific case I could just check whether the connection_worker is running, but what I&#39;m really trying to test here is how to communicate between the two workers, not whether the connection_worker is alive.<br>
<br>So I&#39;m wondering what the best way to communicate between these workers is. I took a look at the advanced stuff and I think that maybe connect and start_server could work for me, but the documentation on them leaves me confused as to how to actually implement them. Any suggestions or help would be much appreciated.<br>
<br>Josh<br>