index_queue 0.1.0

A queue for unique indices with constant-time query and removal
Documentation
  • Coverage
  • 14.29%
    1 out of 7 items documented0 out of 6 items with examples
  • Size
  • Source code size: 21.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Rufflewind/index_queue
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Rufflewind

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).