Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

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?

Yves
0 Kudos
1 Reply
Highlighted
Employee
11 Views

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.
0 Kudos