Closed snovity closed 10 years ago
async
isn't totally needed. If you wanted manage the timer in some way, then don't use async
. However, I imagined it more of a "set it and forget it" operation just putting it in to a new thread using async
is ok too.
I'm not sure I follow the last part. Showing me some code might help.
oh...I see what you're saying about Job.new.async.after(60){ perform("asdf") }
. I've removed it from the README.
Grate gem, thanks for your work! A few questions about documentation. Here is a quote from it.
But it seems everything is working just fine when doing just
Job.new.later(60, "asdf")
. As I understand it, the only thing thatasync
does in this case, is that timer setup itself is happening asynchronously. Is it correct? (I'm new to Celluloid)Also, it seems that a call without dedicated method
Job.new.async.after(60){ perform("asdf") }
can't work without instantiatingJob
inside block again. And maybe shouldn't be advised to use at all, because at least I experienced that in case of an exception happening directly inside block (without crossing theAgent
boundary), instead of a worker thePoolManager
itself crashes and no jobs are ever done without process restart.