C++ Is there any threadsafe to write into (faster than not thread safe analogs busted with locks) component?
So I tried some co开发者_Go百科mponents (maps, sets, vectors, arrays, queues U name it), I always have to make tham thread safe... and that makes tham slow... Is there any threadsafe to write into component? in Boost or anywhere?
You can find some in Intel's Thread Building Blocks. You can also find some in Microsoft's PPL.
You can have a look at libcds
: Concurrent Data Structures by Max Khiszinsky.
It contains highly generic/configurable lock-free containers and algorithms. It comes with extensive tests. The documentation is about average, I'd say.
Trivia The library looked ready for proposition into boost, but (AFAICT) it hinges on the patent-encumberd algorithms that it might contain
Boost.Lockfree was recently under review for inclusion in Boost. I do not know the outcome of this review.
精彩评论