Am 23.01.2014 15:44, schrieb Frustrated:
So, TLS solves the data issue with threading. I just thought,
with out much thinking, what about having thread local functions?
Doesn't make sense? Let me explain.
Functions generally are not thread safe because of reentry,
right? The same data is used by the function for each thread
calling it and sense threads could effectively call a function
while the same function is being executed by another thread, the
data is correct.
no - the parameters and local vars of the function are in the stack of
the thread - so there is no problem with them, only shared variables can
have a need to synchronization
your idea tries to solve non existing problems?