Skip to content

Commit

Permalink
mention that the delay helper can only be used for flow-control
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 29, 2017
1 parent 1f14b86 commit 62ffba5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -304,12 +304,10 @@ Check or get name of current route.
$c->delay(sub {...}, sub {...});
Disable automatic rendering and use L<Mojo::IOLoop/"delay"> to manage callbacks
and control the flow of events, which can help you avoid deep nested closures
that often result from continuation-passing style. Also keeps a reference to
L<Mojolicious::Controller/"tx"> in case the underlying connection gets closed
early, and calls L</"reply-E<gt>exception"> if an exception gets thrown in one
of the steps, breaking the chain.
Disable automatic rendering and use L<Mojo::IOLoop/"delay"> for flow-control.
Also keeps a reference to L<Mojolicious::Controller/"tx"> in case the underlying
connection gets closed early, and calls L</"reply-E<gt>exception"> if an
exception gets thrown in one of the steps, breaking the chain.
# Longer version
$c->render_later;
Expand Down

0 comments on commit 62ffba5

Please sign in to comment.