- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some code that fills in a std::vector with some Job objects (std::vector). Each Job object has a tbb::mutex mMutexes[2]member. No mutex is being used at all, yet. Thing is, once the vector goes out of scope, causing all Jobs to be destroyed, a Critical Error occurs pointing to internal_destroy() inside tbb::mutex's destructor.
Changing from tbb::mutex to tbb::spin_mutex does not cause any issues.
Thanks.
Changing from tbb::mutex to tbb::spin_mutex does not cause any issues.
In case tbb::mutex cannot be assigned (as it may happen during a std::vector resize()), should not it be disallowed in the first place? In case it should work, do you have any ideas why that code causes such an error?
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are right in the assumption that mutexes should not be assigned or copied, andthat it should be disallowed. It can be considered a bug we need to fix.

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