Feat: add an example for spmc ring buffer#181
Conversation
The example follows several other examples such as hello-single-latest-async. It features one producer and two consumers running at different rates and tries to simulate the lagging/dropped message behavior of the ring.
There was a problem hiding this comment.
Thanks for the PR and welcome. This is really a nice first contribution! The example builds and runs cleanly, fmt/clippy are green and the slow-consumer-lags-and-drops behavior comes through clearly in the output. That's exactly the SPMC ring story we wanted for #101.
Four small changes inline below, posted as one-click suggestions. Everything else looks good to me. Thanks again for taking this one on!
Remove unneeded package. Using tokio with time feature only. Co-authored-by: sounds.like.lx <147444674+lxsaah@users.noreply.github.com>
- Reorganize workspace order - Switch to getting timestamp from time context instead of system unix time
Thx for the comment. It's my first time contributing something so I'm not used to all conventions. I have repushed changes, |
Description
This is an PR for the issue #101.
The example follows several other examples such as hello-single-latest-async. It features one producer and two consumers running at different rates and tries to simulate the lagging/dropped message behavior of the ring.
Related Issue
Checklist
make check).