Currently, op_iter functions use Vec to collect op results to vec and returns vec.into_iter().
I recommend use buffered lock-free iterator generator crate - buter or similar
For example, it will look like this:
//! before
let mut vec = Vec::with_capacity(...);
self.each(..., |link| {
vec.push(link);
Continue
});
vec.into_iter()
//! after
let writer = self.buter.writer();
self.each(..., |link| {
writer.extend(Some(link));
Continue
});
writer.into_iter()
Currently,
op_iter
functions useVec
to collectop
results tovec
and returnsvec.into_iter()
. I recommend use buffered lock-free iterator generator crate -buter
or similarFor example, it will look like this: