Boost logo

Boost Users :

From: Eduardo Panisset (eduardo.panisset_at_[hidden])
Date: 2008-08-18 14:08:09


Hi,

Just for clarifying what I mean by "smart iterator": a smart iterator would
be a iterator that acquires/releases locks on container/container items.

If we would consider a Reader/Writer paradigm - few writtings and many
readings, then a const_iterator would acquire/release a read lock on
container and read lock on item, and a iterator would acquire/release a read
lock on container and a write lock on item.

For writting operations on container (e.g insert, remove), we would acquire
write lock on container.
Of course, we would consider a container stability, if stable (e.g.
std::list, std::map) or unstable( e.g. std::vector, std::deque) in order to
optimizing the solution (stable containers would allow simultaneous
read/write operations on container).

obs:Maybe the paradigm of concurrency could be a parameter.

There is an analogous iterator in boost ?

Thanks.
Eduardo Panisset



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net