Skip to content

Commit

Permalink
parallol_done -> on_parallol
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Aug 4, 2011
1 parent c108fc8 commit e9e12e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -41,7 +41,7 @@ get '/' => sub {
$db->select('foo', $self->parallol(sub { $foo = pop }));
$db->select('bar', $self->parallol(sub { $bar = pop }));

$self->parallol_done(sub {
$self->on_parallol(sub {
$self->render(json => { foo => $foo, bar => $bar });
});
};
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Plugin/Parallol.pm
Expand Up @@ -8,7 +8,7 @@ sub register {
$app->hook(before_dispatch => sub {
my $self = shift;
$self->{paralloling} = 0;
$self->attr('parallol_done' => sub {
$self->attr(on_parallol => sub {
sub { $self->render }
});
});
Expand All @@ -22,7 +22,7 @@ sub register {

sub {
&$callback(@_);
&{$self->parallol_done}($self) if --$self->{paralloling} == 0;
&{$self->on_parallol}($self) if --$self->{paralloling} == 0;
}
}
);
Expand Down

0 comments on commit e9e12e5

Please sign in to comment.