Open chifflier opened 5 years ago
Yes, good idea! IIRC @keruspe too encountered an issue with a shift that happened at the wrong time
On Wed, Jun 5, 2019, 15:47 Pierre Chifflier notifications@github.com wrote:
Hi @Geal https://github.com/Geal ,
The consume method shifts data if >= half the buffer. I'm using the circular crate as a fixed-position buffer (for multi-threading) and need to control when data is moved.
Would you be OK for adding a new method (consume_noshift or something ilke that) which just adds cnt without shifting data ? I can provide a patch :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sozu-proxy/circular/issues/2?email_source=notifications&email_token=AAA5EAAC6PWTFZ6GSFRNXJ3PY67YJA5CNFSM4HTYGKJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXYY5CA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5EAB3TWYI4ETTDA5GN73PY67YJANCNFSM4HTYGKJA .
Unless I'm missing something this was added in 0.3 so this issue can be closed
Hi @Geal ,
The
consume
method shifts data if >= half the buffer. I'm using thecircular
crate as a fixed-position buffer (for multi-threading) and need to control when data is moved.Would you be OK for adding a new method (
consume_noshift
or something ilke that) which just addscnt
without shifting data ? I can provide a patch :)