Re: [PATCH v2 2/2] hex: make hash_to_hex_algop() and friends thread-safe
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 10, 2020, 14:15 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2008101613440.50@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CAHd-oW6mvaANTBX5sVEi49s_Ku71-ZXqhyePtkwbCKaTK7tm4Q@mail.gmail.com>
Hi Matheus,
On Sat, 18 Jul 2020, Matheus Tavares Bernardino wrote:
Show 11 quoted lines
> On Thu, Jul 16, 2020 at 9:56 AM Johannes Schindelin > <Johannes.Schindelin@gmx.de> wrote: > > Alternatively, if using thread-local storage is still an option, I > think I might have solved the problems we had in the previous > iteration with memory leaks on Windows. I changed our > pthread_key_create() emulation to start using the destructor callback > on Windows, through the Fiber Local Storage (FLS) API. As the > documentation says [1] "If no fiber switching occurs, FLS acts exactly > the same as thread local storage". The advantage over TLS is that > FLSAlloc() does take a callback parameter.
Okay, but I am still not so enthusiastic. We can fix this in a much simpler way, I believe, than introducing the first thread-local storage user. Let's leave TLS until the time we actually need it?
Ciao, Dscho