stochastic-queue

Crates.iostochastic-queue
lib.rsstochastic-queue
version0.2.0
sourcesrc
created_at2023-03-28 12:21:09.495206
updated_at2023-04-24 22:59:35.745417
descriptionQueue and MPMC channel that pops in a random order
homepagehttps://github.com/wilsonzlin/stochastic-queue
repositoryhttps://github.com/wilsonzlin/stochastic-queue.git
max_upload_size
id822984
size11,705
Wilson Lin (wilsonzlin)

documentation

README

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.

Commit count: 9

cargo fmt