concurrent-vector

tbb::concurrent_vector returns wrong size

不问归期 提交于 2019-12-11 06:13:09
问题 I've asked this question on a TBB forum, but I'm hoping someone here might have some additional thoughts. I was debugging an issue we're seeing and noticed some strange behavior from tbb::concurrent_vector . The bottom line is that after a push_back() call actually completes, the size() of the concurrent_vector does not reflect this. I've narrowed it down to be capacity related because if I capture capacity() and size() , size() == capacity() => true which leads me to believe that size() is

Is there a lock-free vector implementation?

…衆ロ難τιáo~ 提交于 2019-12-09 15:00:08
问题 First result in Google for "lock free vector" is a research paper cowritten by Damian Dechev, Peter Pirkelbauer and Bjarne Stroustrup describing a theoretical lock-free vector. Has this, or any other lock-free vector, been implemented? 回答1: MS provides ppl::concurrent_vector and Intel provides tbb::concurrent_vector. On Windows at least ppl and tbb are part of the C-Runtime. 回答2: I've just looked up what a vector is, in the wikipedia. I think (only a minute or two of thinking, mind) a fully

Is there a lock-free vector implementation?

拟墨画扇 提交于 2019-12-04 02:34:07
First result in Google for "lock free vector" is a research paper cowritten by Damian Dechev, Peter Pirkelbauer and Bjarne Stroustrup describing a theoretical lock-free vector. Has this, or any other lock-free vector, been implemented? MS provides ppl::concurrent_vector and Intel provides tbb::concurrent_vector. On Windows at least ppl and tbb are part of the C-Runtime. I've just looked up what a vector is, in the wikipedia. I think (only a minute or two of thinking, mind) a fully lock-free version is a bit problematic. Consider; you create the array, access it as per normal, etc. For this you