I'd be grateful if people could sketch compelling use cases for concurrent data
structures, ideally with examples of situations in which they have been
successfully employed. Such data structures need not be lock-free (e.g., they
might use fine-grained locking or lock striping), but they should be
substantially more scalable than a design based on locking an entire data
structure for each access.
Thanks,
Scott
--
* C++ and Beyond: Meyers, Sutter, & Alexandrescu, Oct. 24-27 near Seattle
(http://cppandbeyond.com/)
* License my training materials for commercial (http://tinyurl.com/yfzvkp9) or
personal use (http://tinyurl.com/yl5ka5p).
:-)
Think of something along the lines of concurrent
http://www.cplusplus.com/reference/string/string/c_str/
I mean:
/* ... */
atomic<stuff *> stuff_ptr;
/* ... */
}; // class thing
const stuff & thing::stuff_instance() { // "lazy" one
stuff * ptr;
// hoist load barrier (with data dependencyncy "hint")
if (0 == (ptr = stuff_ptr.load(msync::ddhlb))) {
ptr = new stuff(/*...*/);
// sink store barrier
if (!stuff_ptr.attempt_update(0, ptr, msync::ssb)) {
delete ptr;
// hoist load barrier (with data dependencyncy "hint")
if (0 == (ptr = stuff_ptr.load(msync::ddhlb)))
abort();
}
}
return *ptr;
}
It really scales.
regards,
alexander.
http://www.boostcon.com/community/wiki/show/private/2010/ points to
http://www.filetolink.com/06c4fa2d
(Tuesday Presentations, C++0x Concurrency)
Michael Wong's Tuesday presentation caught my attention (just read the
pdf).
It would be nice to have it available as
> The chart I'm talking about is in my slides http://www.filetolink.com/7dd7b80e
> page 12. Some of the talks are already up at blip.tv http://blip.tv/posts/?q=boostcon.
.tv video as well, I think.
Is it possible?
regards,
alexander.
All the talked were recorded, and will hopefully appear on blip.tv
sooner or later. But it is volunteer work, and takes time.
Tony