Tulip_Sync
An Tulip_Sync<T> object is a variable that can be written to once and
read as many times as you want. However, if a read is attempted prior to
a write, the reading thread will be blocked. Many readers can be waiting
for a single Tulip_Sync<T> object and when a value is written to it,
all the waiting readers are released. Readers that come after the initial
write see this as a const value.
Class Definition
template<class T>
class Tulip_Sync{
public:
operator =(T &); // assign a value
void read(T &); // another form of read
void write(T &); // another form of writing
bool peek(T &); // TRUE if the value is there,
// returns FALSE otherwise.
};
Examples
Suvas Vajracharya