You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2001/10/16 21:43:15 UTC

Re: Question about Patterns and Thread Safety

>Is it safe/recommended to place patterns in a singleton and use the
>Perl5Compiler.READ_ONLY_MASK?

Yes, Perl5Compiler.READ_ONLY_MASK is required and therefore safe
if patterns are to be shared between multiple threads.  Without it,
Perl5Matcher tries to optimize matching performance by storing some
heuristic information in Perl5Pattern after every match attempt that
can be helpful in making future matches faster.

daniel