Subject: | Lingua-Stem-Snowball is not thread safe |
Date: | Sat, 3 Aug 2013 08:57:48 +0200 |
To: | marvin [...] rectangular.com, bug-Lingua-Stem-Snowball [...] rt.cpan.org |
From: | Thomas Eckardt <Thomas.Eckardt [...] thockar.com> |
Hi Marvin,
Lingua-Stem-Snowball is still not thread safe because the defined
$stemmifier variable (object) is (possibly wrong) cloned in to a new
thread.
To prevent this put these two sub's in to Lingua::Stem::Snowball.pm
# called in the context of a new thread to receate the home Stemmifier
sub CLONE {
$stemmifier = Lingua::Stem::Snowball::Stemmifier->new;
}
# called before cloning to destroy the parent home Stemmifier
sub CLONE_SKIP {
undef $stemmifier;
}
Best regards
Thomas
DISCLAIMER:
*******************************************************
This email and any files transmitted with it may be confidential, legally
privileged and protected in law and are intended solely for the use of the
individual to whom it is addressed.
This email was multiple times scanned for viruses. There should be no
known virus in this email!
*******************************************************