smol-rs / concurrent-queue

Concurrent multi-producer multi-consumer queue
Apache License 2.0
253 stars 21 forks source link

Merge implementation with crossbeam-queue #50

Open notgull opened 11 months ago

notgull commented 11 months ago

From a brief glance at both crates, it seems to me that there is very little noticeable difference between the algorithm used in concurrent-queue and the one used in crossbeam-queue. It would be nice to just re-implement concurrent-queue in terms of crossbeam-queue if there are no/little significant differences between the two implementations, as it would deduplicate code in the Rust ecosystem.

taiki-e commented 4 months ago

IIRC, the main difference is the presence of code for the single-capacity cases (see also https://github.com/crossbeam-rs/crossbeam/issues/199#issuecomment-1019549315) and disconnect(close) support.

taiki-e commented 3 months ago

I think there may also be a few optimizations that are present in crossbeam but not in concurrent-queue, such as https://github.com/crossbeam-rs/crossbeam/pull/1057.