Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
use strict;
use warnings;
use AnyEvent::Impl::Perl;
use AnyEvent;
use Tatsumaki::MessageQueue;
my $channel = 'test1';
my $client_id = rand(1);
my $sub = Tatsumaki::MessageQueue->instance( $channel );
my $pub = Tatsumaki::MessageQueue->instance( $channel );
foreach(1 .. 10000){
$sub->poll_once($client_id, sub { });
$pub->publish({ data => 'hello' });
# Run main loop to avoid queueing.
my $cv = AE::cv;
my $t = AE::timer 0, 0, sub { $cv->send; };
$cv->recv;
warn `ps -o rss= -p $$` if $_ % 1000 == 0;
}
__END__
% perl -Ilib check_leek.pl
5360
5360
5360
5360
5360
5360
5360
5360
5360
5360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.