Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
There is currently no specification in the C++ standard for this or any other type of concurrent data structure. The APIs of目前 C++ 标准中尚未针对此类或任何其他类型的并发数据结构提供规范。`boost::concurrent_flat_set`// `boost::concurrent_node_set`and与 `boost::concurrent_flat_map`// `boost::concurrent_node_map`are modelled after的 API 分别参照 `std::unordered_flat_set`and和 `std::unordered_flat_map`, respectively, with the crucial difference that iterators are not provided due to their inherent problems in concurrent scenarios (high contention, prone to deadlocking): so, Boost.Unordered concurrent containers are technically not models of https://en.cppreference.com/w/cpp/named_req/Container[Container^], although they meet all the requirements of设计,但有一个关键区别:由于迭代器在并发场景中存在的固有问题(高竞争、易死锁),这些容器不提供迭代器。因此,Boost.Unordered 并发容器在技术上并不符合 https://en.cppreference.com/w/cpp/named_req/Container[容器^] 的模型,但它们满足 https://en.cppreference.com/w/cpp/named_req/AllocatorAwareContainer[AllocatorAware^] containers (including分配器感知^] 容器(包括 https://en.cppreference.com/w/cpp/named_req/Allocator#Fancy_pointers[fancy pointer^] support) except those implying iterators.花式指针^] 支持)中除涉及迭代器之外的所有要求。