mpmcpq

Crates.iompmcpq
lib.rsmpmcpq
version0.9.3
sourcesrc
created_at2022-01-01 22:21:28.111323
updated_at2022-12-22 15:07:41.639343
descriptionMulti-producer multi-consumer Priority Queue
homepage
repositoryhttps://github.com/cehteh/mpmcpq.git
max_upload_size
id506324
size24,948
(cehteh)

documentation

http://docs.rs/mpmcpq

README

Description

A multi-producer multi-consumer priority queue with some special features.

Allows threads to send and receive messages ordered by priority.

While a thread is processing a message, received messages can be protected by a guard this keeps the queue in a non-drained state the thread may send new messages to the queue to be processed. Once the queue becomes empty and all guards are dropped a single 'Drained' message is generated to notify (one of) the receivers that no more data is to be expected.

When performance is more important than exact priority order threads can hold a 'stash' to temporary store messages to be send. When the queue is contended messages will be put on this stash instead. Once the thread gets the lock on the queue the stash will be moved over to the queue.

Commit count: 25

cargo fmt