index_queue

Crates.ioindex_queue
lib.rsindex_queue
version0.1.0
sourcesrc
created_at2017-03-28 19:47:19.619319
updated_at2017-03-28 19:47:19.619319
descriptionA queue for unique indices with constant-time query and removal
homepage
repositoryhttps://github.com/Rufflewind/index_queue
max_upload_size
id9187
size21,568
Phil Ruffwind (Rufflewind)

documentation

https://docs.rs/index_queue

README

index_queue

A queue for unique indices (integers) with O(1) push/pop and O(1) lookup/removal. It is a doubly-linked list with all its nodes stored inside a single Vec. The queue is most memory efficient when the integers are relatively small and densely packed. The implementation is similar to ixlist, but index_queue is more specialized: it allows querying whether an index already exists as well as removal by index, but does not allow duplicate indices.

The queue works well with indices obtained from array-based allocators such as vec_arena or slab.

This crate was originally created to implement a cooperative FIFO task scheduler (synchrotron).

Commit count: 5

cargo fmt