search for: safe_to_kill

Displaying 3 results from an estimated 3 matches for "safe_to_kill".

2006 Jun 28
1
How to add some process control...
...self[job_key].start_process return job_key else raise ::BackgrounDRbDuplicateKeyError end } end In MiddleMan::delete_worker(), I''ve added steps where, if the job is still alive, activate the kill signal to the job, and wait for it to clean itself up and activate the :safe_to_kill signal. Then kill it. def delete_worker(key) @mutex.synchronize { if @jobs[key] if (@jobs[key].thread.alive?) @jobs[key].thread[:kill] = true; @jobs[key].thread[:safe_to_kill].wait(@mutex) @jobs[key].thread.kill end @jobs.delete(key) end @tim...
2006 Aug 24
3
A new QueueWorker class
Hello all, I''ve come up w/ a worker class that manages queued jobs using a fixed number of child workers. Well, that''s not quite true -- a new worker is spawned for each job, but you set the total number that may exist at once. There are three components: 1) queue_worker.rb: The singleton worker that manages the child workers. You probably want to auto start this. Make sure you
2006 Jul 01
9
BackgrounDRb New release.
Howdy Folks- I''m happy to announce a new release of BackgrounDRb! I have added quite a few new features and included some nice patches from folks on the list. $ script/plugin install svn://rubyforge.org//var/svn/backgroundrb All of the code now stays within the plugin and the start and stop scripts are now just stubs. This makes it easier to tweak or figure out how it works.