https://github.com/zesterer/async-priority-queue
An async-aware priority queue
https://github.com/zesterer/async-priority-queue
Last synced: about 1 year ago
JSON representation
An async-aware priority queue
- Host: GitHub
- URL: https://github.com/zesterer/async-priority-queue
- Owner: zesterer
- License: apache-2.0
- Created: 2021-01-13T16:31:55.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-13T19:27:00.000Z (over 5 years ago)
- Last Synced: 2025-03-25T13:21:16.205Z (about 1 year ago)
- Language: Rust
- Size: 8.79 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `async-priority-queue`
[](https://crates.io/crates/async-priority-queue)
[](https://docs.rs/async-priority-queue)
[](https://github.com/zesterer/async-priority-queue)
An async-aware priority queue.
## Example
```rust
let queue = PriorityQueue::new();
queue.push(2);
queue.push(1);
queue.push(3);
assert_eq!(queue.pop().await, 3);
assert_eq!(queue.pop().await, 2);
assert_eq!(queue.pop().await, 1);
```
## License
I originally wrote this crate during employment by IOTA Stiftung. IOTA still legally owns the code, but it was licensed
under Apache 2.0, meaning that I have the right to modify and redistribute it under my own name.
`async-priority-queue` is distributed under the
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) (see `LICENSE`).