On April 22, 2015 1:10:12 AM EDT, Ben Pope
I like the idea of using a circular_buffer, but still not sure how to time the data on this buffer. I'd like for objects on this buffer to be removed after n seconds, and not based on fixed capacity where they get over-written. Or did I misunderstand? I think somehow attaching a timer to each and every object on this buffer is the part I'm having
On Wednesday, April 22, 2015 12:22 PM, Lane wrote: trouble
with efficiently.
I don't think you need to remove them after n seconds, you just need to
not read entries older than n seconds, so perhaps store the data with a
timestamp, and then clean up or ignore old entries during the read.
Seems like a fairly straightforward thing to do with vectors and iterators? That's standard C++, nothing boost-y about that. Use the algorithms if necessary. Or boost.range if necessary. Possibly lockfree to help with new versus expired items, etc.
Ben
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.