my $id = Mojo::IOLoop->recurring($interval => sub { ... });

Within the sub, is it possible to adjust the $interval of the event loop
for that sub?

Does that make sense?

I have an action within a recurring sub and if the action fails I'd like to
extend the amount of time until it gets tried again.  I use prime numbers.

Under normal circumstances, the $interval would be 1.  But if it fails, it
shouldn't try again until 2, then 3, then 5, 7, 11, 13, 17 seconds...

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to