Original Post
how would a double buffer work in a multi process enviroment? ie: a piece of data would have two copies, one for reading one for writing, so that two operations would not interfere. since one piece of data is read-only, multiple processes can use it at once. when a write happens, the two pieces are swapped. thing that bothers me is how to implement get/set functions for it. passing data around is not really smart, so it should be done with pointers or references, right? let's start with this:
template
class DoubleBuffer<class TYPE>
{
private:
TYPE mdOne;
TYPE mdTwo;
};
// and use this for thread safety:
template
class ScopedLock<class TYPE>
{};