nicholassm / disruptor-rs

Low latency inter-thread communication library in Rust inspired by the LMAX Disruptor.
MIT License
618 stars 18 forks source link

Async Interface #13

Closed theduke closed 1 month ago

theduke commented 1 month ago

Cool to see a port of disruptor to Rust!

Are there any plans for adding an async interface?

Most of the usecases I have nowadays need async - you can't block an executor thread while waiting for new messages...

nicholassm commented 1 month ago

I'm far from an expert in Async but I don't think this crate and approach would be suited for Async. It's focusing 100% on low latency and Async is all about efficient execution of code that could block on e.g. IO or other resources that are yet not available. This disruptor sacrifices CPU resources to achieve the lowest possible latency and is thus - from that perspective - horrible inefficient.

Kind regards Nicholas

nicholassm commented 1 month ago

@theduke - there's also a great discussion in the comment section on Hackernews: https://news.ycombinator.com/item?id=40954104