why to use Thread Local Storage (TlsAlloc, TlsGetValue, ets) instead of local variables

Viewed 6970

my question is why use TLS mechanism instead of just local variables in a thread function? Can you please provide some fine example, or what's the advantage of TLS over local vars? Thank you, Mateusz

5 Answers
Related