EV-Redis

 view release on metacpan or  search on metacpan

t/flow_control.t  view on Meta::CPAN


    is scalar(@results), 2, 'both callbacks executed';
    is $results[0][0], 'cmd1', 'cmd1 first';
    is $results[0][1], 'OK', 'cmd1 succeeded';
    is $results[1][0], 'cmd2', 'cmd2 second';
    is $results[1][2], 'disconnected', 'cmd2 got disconnect error';

    $r->max_pending(0);
}

# Edge case: reconnect after disconnect (separate event loop iterations)
{
    $r->connect_unix( $connect_info{sock} );

    my @results;

    $r->command('set', 'recon_1', 'val1', sub {
        push @results, ['cmd1', @_];
        $r->disconnect;
    });



( run in 2.485 seconds using v1.01-cache-2.11-cpan-71847e10f99 )