Classes | |
struct | ts_resource |
struct | tss_resource_with_cache |
struct | tss_resource_once_init |
Assume you have
struct data {
std::string name;
std::string desc;
};
some_locker<data> lk;
In order to access the locked data for write, you do:
some_locker<data>::write obj(lk); obj->name = "coolio"; obj->desc = "it works!";
In order to access the locked data for read, you do:
some_locker<data>::read obj(lk);
std::cout << obj->name << "/" << obj->desc;