Using enumerable_thread_specific for classes

Using enumerable_thread_specific for classes

Hi there,

Are there any restrictions for using enumerable_thread_specific fo a class that not only holds data but also have methods that may be called to do some work on that data?


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

That should work without any problem unless the methods defeat the point of thread-specific storage.

E.g., I can imagine getting into trouble if one of the methods passes "this" (or an address of a member) in a way that lets another thread access the object.

Leave a Comment

Please sign in to add a comment. Not a member? Join today