Skip to main content

Crate pi_buckets

Crate pi_buckets 

Source
Expand description

自动扩展槽位的对象槽。 由多个固定槽构成,每个固定槽用不扩容的Vec来装元素。 当槽位上的Vec长度不够时,不会扩容Vec,而是线程安全的到下一个槽位分配新Vec。 第一个固定槽位的Vec长度为32。 固定槽迭代性能比Vec慢1-10倍, 主要损失在切换bucket时,原子操作及缓存失效。

Macros§

buckets
Creates a Buckets containing the given elements.

Structs§

BucketIter
An iterator over the elements of a Buckets<T>.
Buckets
A lock-free, auto-expansion buckets.
Location

Constants§

BUCKETS
MAX_ENTRIES
SKIP
SKIP_BUCKET

Functions§

bucket_alloc