AnyMQ

 view release on metacpan or  search on metacpan

t/cycle.t  view on Meta::CPAN

$sub->poll_once(sub { ok(1, 'got message') });

memory_cycle_ok( $sub, 'no leaks' );

$topic->publish({ data => 'hello' });

memory_cycle_ok( $sub, 'no leaks in subscriber' );
memory_cycle_ok( $topic, 'no leaks in publisher' );

# We''re actually relying on the poll_once test, hacky but not sure how to
# verify

$sub->poll(sub { });

memory_cycle_ok( $sub, 'no leaks in subscriber' );
memory_cycle_ok( $topic, 'no leaks in publisher' );

done_testing;



( run in 0.420 second using v1.01-cache-2.11-cpan-5467b0d2c73 )