On 1/20/22 2:24 PM, Yann Ylavic wrote:
>
> All good points, thanks RĂ¼diger, should be fixed in r1897250.
Great. I guess next we need to think what we do for 2.4.x.
Even when 1.8.x is released, we cannot demand it for 2.4.x (for trunk we could).
I guess we have two general choices:
1. We implement it differently on 2.4.x also using TLS when available, but not
requiring APR 1.8.x.
2. We recommend that people who switch over to PCRE2 to use APR 1.8.x for
performance reasons.
As using PCRE2 make some sense and should be encouraged 2. would make it
difficult for people tied to older APR versions like some
distributions.
For 1. my rough idea would be that in case of a threaded MPM we could store the
apr_thread_t pointer of a worker_thread in a TLS.
That would solve the performance issue in most cases.
BTW: I think the current code does not work well in the case of
!APR_HAS_THREADS, but in this case we could just a static variable
to store the pointer, correct?
Regards
RĂ¼diger