My code is as follows, I use .begin() to get the first element in the set, and it can be obtained correctly, but using .unsafe_erase(iterator) will often crash. Of course, the first line(WriteGuard) is a write lock.
I don't know why this happens, can someone give me some suggestions, thanks in advance
可能是tbb版本太老了,换个新的,参看下面的链接
concurrent_multiset/concurrent_set crashes when using unsafe_erase() · Issue #636 · oneapi-src/oneTBB · GitHub