Thread Local Storage


#1

Hi.

I need to use thread-related data,

Is there a JUCE support for that? and if not, can you suggest a way to do it?
I saw stuff like:

__thread int number;

and

__declspec(thread) int number;

But that’s doesn’t look like a cross-platform solution.

Thanks


#2

Unfortunately some targets (e.g. android) just don’t support it, so it’s hard to find a cross-platform solution. If you know that all your targets can support it, you should be ok using those compiler directives.


#3

If you really want it you can look at boost.


#4

Thanks , will be considered.