- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page