get rid of the manual atomics stuff in favor of using a OnceLock for the "lazily initialized capture index"
To test:
Existing behavior should still work
Per earlier PR if you want to more actively try and see that the capture index never "double-prints" an error then you can eg artificially add a long delay in the calculation of the capture index (ie .get_or_init()) and still see that passing an unknown capture name results in a single error message being printed
In this PR:
OnceLock
for the "lazily initialized capture index"To test: Existing behavior should still work Per earlier PR if you want to more actively try and see that the capture index never "double-prints" an error then you can eg artificially add a long delay in the calculation of the capture index (ie
.get_or_init()
) and still see that passing an unknown capture name results in a single error message being printedBased on
extract-modules