[KinoSearch] Re: Internal error: field_num 111 > max_field_num 6
Marvin Humphrey
marvin at rectangular.com
Tue Jun 12 12:20:15 PDT 2007
On Jun 12, 2007, at 8:42 AM, Aaron Crane wrote:
> That seems reasonable. Am I right in thinking that adding
> something like
> this to a suitable base class would help people avoid shooting
> themselves in
> the foot?
>
> sub CLONE {
> croak "KinoSearch cannot currently run in a multi-threaded
> Perl";
> }
You're right, Aaron.
That method is actually present in 0.15, in KinoSearch::Util::Class...
sub CLONE {
my $package = shift;
die( "CLONE invoked by package '$package', indicating
that threads "
. "or Win32 fork were initiated, but KinoSearch is not
thread-safe"
);
}
... but I'd taken it out in the 0.20 branch.
I was thinking that it was draconian to kill any threaded app that
loaded any KinoSearch class, even if it was in some distant
dependency somewhere and KS wasn't actually used. Seemed like being
a bad citizen, somehow. But I've been persuaded by this email thread
that more pain results from the failure to throw an appropriate
exception. I'll restore the method as you suggest.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
More information about the kinosearch
mailing list