[Backgroundrb-devel] Can I do this, question

Ed W lists at wildgooses.com
Sun Apr 13 05:41:27 EDT 2008

hemant kumar wrote:
> you can use :
> add_timer(5) { send_delayed_mail(mail_content_id) }
> It will send all mails delayed by 5 seconds also, you should not use
> sleep in your code to simulate "pause". sleep doesn't work well with
> nonblocking IO reactor loops.

OK, cool.  So if I want to delay the start by five seconds AND I expect 
the process I am running to take (say) 60 seconds to complete (some 
theoretical long running process), what's the best way to structure that 
so that I don't block the IO loop?


Ed W

More information about the Backgroundrb-devel mailing list