Crates.io | cpq |
lib.rs | cpq |
version | 0.2.0 |
source | src |
created_at | 2022-08-31 15:36:44.392158 |
updated_at | 2022-11-02 17:33:23.384215 |
description | A Concurrent Priority Queue implemented in Safe Rust. |
homepage | |
repository | https://github.com/hankjordan/cpq |
max_upload_size | |
id | 655768 |
size | 22,140 |
A Priority Queue allows you to prioritize what items come out of the queue based on some predetermined value.
A Concurrent Priority Queue allows you to do this, but it's a Send + Sync
type with interior mutability (it can be modified without having an exclusive / mutable reference).
See examples/main
for usage - it's an extremely simple API based on push
/ pop
.
v0.1.0
was an implementation with raw atomics, using Unsafe Rust.v0.2.0
or greater uses a RwLock internally, with zero Unsafe Rust.