This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/loc_tools.pl: Consider thread 0 always locale-safe
authorKarl Williamson <khw@cpan.org>
Wed, 21 Oct 2020 10:46:51 +0000 (04:46 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 23 Oct 2020 13:07:27 +0000 (07:07 -0600)
commitb0441c5bc62aa2ba1980c5ae151db48af58bcfcf
tree7ffc9f208c3850686a7d5525db38d6c7f65fcee1
parent65ff256a878d82cdb1d89d1c272a696485588dcc
t/loc_tools.pl: Consider thread 0 always locale-safe

Test files call this code to see if locales are enabled.  Prior to this
commit, it returned that they were disabled on builds where there are
possible races between threads.  This was to silence some rarely
occurring smoke failures.  But that had the result that such builds
didn't get locales tested at all, even if there was just a single thread
operating.  This commit changes it so that when called from other than
the main thread on such a system, it returns disabled, but enabled for
the main thread.
t/loc_tools.pl