stochastic-queue 0.2.0

Queue and MPMC channel that pops in a random order
Documentation
  • Coverage
  • 74.07%
    20 out of 27 items documented1 out of 20 items with examples
  • Size
  • Source code size: 14.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.35 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 20s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • wilsonzlin

stochastic-queue

A queue and MPMC channel that pops items in a uniformly random order, instead of FIFO. Useful for nondeterminism, such as simulating chaos for testing or picking branches unpredictably.

Because there is no predetermined order, it's not possible to peek or iterate the queue. An item will always be popped if at least one is present in the queue.

Check the docs for usage guides and examples.