Perl-совместимые регулярные выражения (Perl-compatible regular expressions)
MULTITHREADING
The PCRE functions can be used in multi-threading applications,
with the proviso that the memory management functions pointed to
by pcre_malloc, pcre_free, pcre_stack_malloc, and
pcre_stack_free, and the callout and stack-checking functions
pointed to by pcre_callout and pcre_stack_guard, are shared by
all threads.
The compiled form of a regular expression is not altered during
matching, so the same compiled pattern can safely be used by
several threads at once.
If the just-in-time optimization feature is being used, it needs
separate memory stack areas for each thread. See the pcrejit
documentation for more details.