AnyEvent-Redis
view release on metacpan or search on metacpan
(Callback is a wrapper around the $cv approach.)
Transactions (MULTI/EXEC)
Redis transactions begin with a "multi" command and end with an "exec"
command. Commands in between are not executed immediately when they're
sent. On receipt of the "exec", the server executes all the saved
commands atomically, and returns all their results as one bulk reply.
After a transaction is finished, results for each individual command are
reported in the usual way. Thus, by the time any of these callbacks is
called, the entire transaction is finished for better or worse.
Results of the "exec" (containing all the other results) will be
returned as an array reference containing all of the individual results.
This may in some cases make callbacks on the individual commands
unnecessary, or vice versa. In this bulk reply, errors reported for each
individual command are represented by objects of class
"AnyEvent::Redis::Error", which will respond to a "->message" method
call with that error message.
It is not permitted to nest transactions. This module does not permit
subscription-related commands in a transaction.
Subscriptions
The subscription methods ("subscribe" and "psubscribe") must be used
lib/AnyEvent/Redis.pm view on Meta::CPAN
=back
=head2 Transactions (MULTI/EXEC)
Redis transactions begin with a "multi" command and end with an "exec"
command. Commands in between are not executed immediately when they're
sent. On receipt of the "exec", the server executes all the saved commands
atomically, and returns all their results as one bulk reply.
After a transaction is finished, results for each individual command are
reported in the usual way. Thus, by the time any of these callbacks is
called, the entire transaction is finished for better or worse.
Results of the "exec" (containing all the other results) will be returned as
an array reference containing all of the individual results. This may in
some cases make callbacks on the individual commands unnecessary, or vice
versa. In this bulk reply, errors reported for each individual command are
represented by objects of class C<AnyEvent::Redis::Error>, which will
respond to a C<< ->message >> method call with that error message.
It is not permitted to nest transactions. This module does not permit
subscription-related commands in a transaction.
=head2 Subscriptions
The subscription methods (C<subscribe> and C<psubscribe>) must be used with a callback:
( run in 3.330 seconds using v1.01-cache-2.11-cpan-9b1e4054eb1 )