[Backgroundrb-devel] When does a worker terminate

Raghu Srinivasan raghu.srinivasan at gmail.com
Fri Feb 27 01:48:44 EST 2009


Hemant  - I thought that script/background start starts all workers
and script/background
stop stops all workers.
How does one explicitly close/exit a  particular worker from within Rails?

On Thu, Feb 26, 2009 at 10:19 PM, hemant <gethemant at gmail.com> wrote:

> On Fri, Feb 27, 2009 at 4:25 AM,  <Tuong.Le at emulex.com> wrote:
> > Hi,
> >
> >
> >
> > In Rails, it seems I can create a new worker with:
> >
> >       worker_abc = Middleman.worker(:foo_worker)
> >
> >
>
> You don't create a new worker like that. It just gives you a handle
> for already running worker.You use MiddleMan.new_worker for creating
> new workers. More details:
>
> http://backgroundrb.rubyforge.org/rails/#new_worker
>
>
> >
> > And later on uses it like:
> >
> >       worker_abc.async_some_task(:arg => data)
> >
> >
> >
> > My question is when does this "worker_abc" go away and its resources
> freed
> > up?  How does Ruby/Rails/backgroundrb know that I am done using
> > "worker_abc"?
> >
>
> It doesn't. You need to explicitly close/exit your workers.
> _______________________________________________
> Backgroundrb-devel mailing list
> Backgroundrb-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20090226/5dedf73d/attachment.html>


More information about the Backgroundrb-devel mailing list