On Wednesday 23 Feb 2011 18:52:30 siegfr...@heintze.com wrote:
> I apologize if this appears multiple times. When I did not see it
> appear, I posted again.
> 
> 
> Does perl have a feature like C# and Java where memory is reclaimed and
> defragmented?
> 
> 
> I just inherited 25K lines of perl code that uses lots of threads. A
> simple grep indicates they have about 100 thread->new statements.
> 
> 
> Back in 2005 Chris Devers responded to a similar post of mine and
> suggested I use fork & exec instead.
> 
> 
> Do threads necessarily leak memory in perl? That is the impression I got
> from Chris Devers response on Jun 19 2005 10:28 in this email list
> (although he did not specifically say that). The code I inherited is
> running on FreeBSD. Since this is my second day on the job, I cannot log
> in yet to check the version numbers.
> 

I would suggest reading these:

* http://perldoc.perl.org/perlthrtut.html

* http://www.perlmonks.org/index.pl?node_id=288022

Threads in Perl 5 are error-prone and unreliable, and you should indeed use 
either fork+exec (or forks.pm on CPAN) or an entirely different language where 
threads are better supported such as C, Qt/C++, Erlang or C#/.NET (the latter 
possibly with Mono).

Regards,

        Shlomi Fish

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs

"My only boss is God. And Chuck Norris who is his boss."

Please reply to list if it's a mailing list post - http://shlom.in/reply .

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to