v.20.7Improvement
Fix data race in lgamma function detected by tsan
Fix data race inlgammafunction. This race was caught only intsan, no side effects really happened. #13842 (Nikolai Kochetov).
Why it matters
This fix addresses a concurrency issue in thelgamma function that, while not causing any known side effects, was identified by tsan. Resolving this data race improves the stability and correctness of multi-threaded operations involving lgamma.