Prev: Deep Clone of array?
Next: SNMP trap forwarding.
From: Christopher Dancy on 15 Apr 2010 13:39 Basically I want to execute a method on a drb service but not wait for it to return .... The DRb service is undumped ... basically just telling it to do something. Is there any easy way to do this? -- Posted via http://www.ruby-forum.com/.
From: Roger Pack on 15 Apr 2010 16:23 Christopher Dancy wrote: > Basically I want to execute a method on a drb service but not wait for > it to return .... The DRb service is undumped ... basically just telling > it to do something. Is there any easy way to do this? Run it in a sub thread you don't join on? -rp -- Posted via http://www.ruby-forum.com/.
From: Christopher Dancy on 16 Apr 2010 09:34 > > Run it in a sub thread you don't join on? > -rp That's actually what I'm doing now and then killing off the thread after a few seconds so as not to waste the precious resources of my 1 single ruby process. I was hoping there was a more elegant solution or maybe just a "right" way to do it. -- Posted via http://www.ruby-forum.com/.
From: Tony Arcieri on 16 Apr 2010 10:57 [Note: parts of this message were removed to make it a legal post.] DRb is inherently synchronous, so unfortunately not. Depending on your problem, you might look at using an asynchronous system such as DelayedJob or Resque On Fri, Apr 16, 2010 at 7:34 AM, Christopher Dancy <christoforever(a)gmail.com > wrote: > > > > Run it in a sub thread you don't join on? > > -rp > > That's actually what I'm doing now and then killing off the thread after > a few seconds so as not to waste the precious resources of my 1 single > ruby process. I was hoping there was a more elegant solution or maybe > just a "right" way to do it. > -- > Posted via http://www.ruby-forum.com/. > > -- Tony Arcieri Medioh! A Kudelski Brand
From: Roger Pack on 16 Apr 2010 12:10 Christopher Dancy wrote: >> >> Run it in a sub thread you don't join on? >> -rp > > That's actually what I'm doing now and then killing off the thread after > a few seconds so as not to waste the precious resources of my 1 single > ruby process. I was hoping there was a more elegant solution or maybe > just a "right" way to do it. I don't think there is (though you could commit a patch to trunk that would allow for it, perhaps). http://emdrb.rubyforge.org Mentions it has "synchronous and asynchronous modes" Though I've never tried it I've run into it a few times. GL. -rp -- Posted via http://www.ruby-forum.com/.
|
Pages: 1 Prev: Deep Clone of array? Next: SNMP trap forwarding. |