Thread (25 messages) flat view 25 messages, 5 authors, 2020-08-10

Re: [PATCH v2 2/2] hex: make hash_to_hex_algop() and friends thread-safe

From: Johannes Schindelin <hidden>
Date: 2020-08-10 14:15:35

Hi Matheus,

On Sat, 18 Jul 2020, Matheus Tavares Bernardino wrote:
On Thu, Jul 16, 2020 at 9:56 AM Johannes Schindelin
[off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help