search for: killpoint

Displaying 1 result from an estimated 1 matches for "killpoint".

Did you mean: killpoints
2006 Jun 28
1
How to add some process control...
...key].thread[:kill] = true; @jobs[key].thread[:safe_to_kill].wait(@mutex) @jobs[key].thread.kill end @jobs.delete(key) end @timestamps.delete(key) if @timestamps.has_key?(key) } end Inside BackgrounDrb:Rails: you can use terminate() to establish the checkpoints/killpoints inside your job code, or check_terminate/terminate? to check, run cleanup code, and then raise the :safe_to_kill signal. def initialize(job_key, args={}) @logger = BACKGROUNDRB_LOGGER @thread = nil; @job_key = job_key @args = args end def start_process begin @thread = Thread.new do...