On Wed, Jun 24, 2020 at 7:29 PM Matheus Tavares Bernardino <matheus.bernardino@xxxxxx> wrote: > > - Regarding, oid_to_hex(), a patch from 2010 [1] proposed a solution > using thread-local storage and pthread_once(). But as Hannes pointed > out in this other thread [2] , implementing a Windows equivalence for > pthread_once() could be tricky and voluminous. Since this thread dates > from 7 years ago, I was wondering if we would be able to implement it > nowadays with InitOnceExecuteOnce() [3]. I forgot to link it before, but here is a commit in libav.git which emulates pthread_once(): https://git.libav.org/?p=libav.git;a=commitdiff;h=b22693b06d1e5d73454a65c203b4d31c1ca5b69a The patch is not so big, and if we consider only Vista+, it seems very straightforward. I'm not very familiar with Windows, though, and I'm not sure if this solution would work for us.