Closed tokahuke closed 3 years ago
Hate to be this guy, but is there any update on this?
~Another useful alternative would be allowing submission of batches of items, but consuming reads only read 1 item at a time (this would only be possible if yaque supports serializing a vec of items, instead of just bytes -- I haven't looked into yaque's API long enough to determine whether this is the case).~ Looks like Yaque supports this.
Update: Never-mind. It looks like the commit
operation is basically a form of peeking?
Yes! I have opened this issue a long time ago because I have thought this feature was useful. It looks like it is not. Maybe I will close this issue as irrelevant.
... except that recv_batch
and friends materialize the peeked result. This may be undesirable in some cases (imagine you want only to count the number of elements in the queue!!).
I think we will need a special API for this, but it can be integrated n the Receiver itself, but I will leave it for a future release (in the "short term"). there is too much already going on in 0.6.0...
Implemented as QueueIter in PR #12 .
The
Receiver<T>
consumes the items from the queue (like.into_iter()
). It Would Be Nice© to have an equivalent to.iter()
.