Using enumerable_thread_specific for classes

Using enumerable_thread_specific for classes

ypoissant's picture

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?

Yves

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Arch D. Robison (Intel)'s picture

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.

Login to leave a comment.