[Backgroundrb-devel] delete_worker doesn't kill the thread?

Ben Johnson bjohnson at contuitive.com
Mon Jul 31 16:06:43 EDT 2006

I made a worker that run an infinite loop and does the following:

while true
@logger << "logging #{Time.now}"
sleep 2

In my secong console I did:

tail log/backgroundrb.log -f

This is so I could see the line getting added to the log every 2  

Then in my other console I started script/console and created a new  
worker. Then killed it with MiddleMan.delete_worker(job_key), where  
job_key was the job key for the worker.

After I did that the other console that was monitoring my log  
continued to add a line every 2 seconds, it didn't stop.

Am I missing something here or shouldn't deleting a worker stop the  
loop and kill the thread?

Thanks for your help.

Thank You,
Ben Johnson
E: bjohnson at contuitive.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20060731/6d22b016/attachment.html 

More information about the Backgroundrb-devel mailing list