PL_foo_mutex is global, _depth is per interpreter
[email protected] (Dave Mitchell) Fri, 22 May 2026 13:28:43 +0100
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
There are a couple of variable pairs,
PL_env_mutex + PL_env_mutex_depth
PL_locale_mutex + PL_locale_mutex_depth
which are used as recursive locks: the depth variable holds the depth of
recursion.
For both these pairs, the mutex var is global and is defined in
perlvars.h, while the depth var is per-interpreter and is defined in
intrpvar.h.
This sounds wrong to me. Is there anything here I'm not seeing, or should
I move PL_*_mutex_depth to perlvars.h?