Skip Menu |

This queue is for tickets about the AnyEvent-Gearman CPAN distribution.

Report information
The Basics
Id: 69135
Status: open
Priority: 0/
Queue: AnyEvent-Gearman

People
Owner: Nobody in particular
Requestors: mpashtet [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: memory leak
Date: Mon, 27 Jun 2011 23:44:20 +0800
To: bug-AnyEvent-Gearman [...] rt.cpan.org
From: qwer <mpashtet [...] gmail.com>
Hello, I find memory leak in module AnyEvent:Gearman::Client. Function _add_task have unnamed subroutine $retry, which never undefined. This subroutine hold $task. $retry not undefined because $on_complete callback (AnyEvent::Gearman::Connection module, add_task subroutine) is not calling, when task is sended.. There is some solution: AnyEvent::Gearman::Connection module: sub add_task { my ($self, $task, $on_complete, $on_error, $type) = @_; $self->add_on_ready( sub { push @{ $self->_need_handle }, $task; $self->handler->push_write( $task->pack_req($type) ); *$on_complete->(); # must have!!!! * }, $on_error, ); weaken($self); return; } Sorry for my english:( Best regards:)
Hi, this bug already fixed in repo and will release soon. Thanks! On Tue Jun 28 13:52:49 2011, mpashtet@gmail.com wrote: Show quoted text
> Hello, > I find memory leak in module AnyEvent:Gearman::Client. > Function _add_task have unnamed subroutine $retry, which never undefined. > This subroutine hold $task. > $retry not undefined because $on_complete callback > (AnyEvent::Gearman::Connection module, add_task subroutine) is not calling, > when task is sended.. > > > There is some solution: > AnyEvent::Gearman::Connection module: > > sub add_task { > my ($self, $task, $on_complete, $on_error, $type) = @_; > > $self->add_on_ready( > sub { > push @{ $self->_need_handle }, $task; > $self->handler->push_write( $task->pack_req($type) ); > *$on_complete->(); # must have!!!! > * }, > $on_error, > ); > weaken($self); > > return; > } > > > Sorry for my english:( > > Best regards:)