Comments on Comments…part 2: Some Example Code…
I have posted some example code on GitHub showing the Shared Immutable, Exclusive Setup ideas discussed in the Comments on comments to Herb Sutter’s updated GotW #6b solution (part 2) blog post to demonstrate the ideas: https://github.com/ralph-mcardell/dibase-blog-sharedimmutable-exclusivesetup My thought was to create a type that was not just a simple chunk of memory, create wrapper types to add support for the intrusive Shared Immutable, Exclusive Setup pattern discussed in the blog post that allowed for easy specification of atomic and memory order policy.
Continue Reading