liberfa / pyerfa

Python bindings for ERFA routines
https://pyerfa.readthedocs.io
BSD 3-Clause "New" or "Revised" License
34 stars 24 forks source link

Port thread safety improvement to classproperty from astropy #63

Closed bmerry closed 3 years ago

bmerry commented 3 years ago

astropy/astropy#11221 fixes a race condition when multiple threads read a lazy classproperty. It looks like classproperty has been copied into pyerfa, so the fix should be ported (once it is merged in astropy).

bmerry commented 3 years ago

Thanks @mhvk, you beat me to it!

mhvk commented 3 years ago

No, thanks to you for realizing we used the classproperty here too!

bmerry commented 3 years ago

It was pure luck: I was digging into pyerfa while investigating leap-seconds and happened across some familiar-looking code :-)