Re: HTML::Parser is not thread-safe

Bo Lindbergh <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Organization /etc/organization
Message-ID <[email protected]>
In article <[email protected]>,
 [email protected] (Father Chrysostomos) wrote:
> It seems to work fine now, except that, if a Parser object is created  
> within a thread *other than* the main thread, perl complains about  
> leaking scalars when the program exits.
> 
> $ perl -MHTML::Parser -Mthreads -le'(async{new HTML::Parser})->join;  
> END { print "end" }'
> end
> Scalars leaked: 1

However, perldoc threads says:
> Returning objects from threads does not work.

So don't do what you did in that example. :-)


/Bo Lindbergh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.