I'm struggling with something very basic that I'm hoping that someone can help clarify. Take for example this pseudo C++ code:
class T {
public
QMutex M;
int I;
}
If I instantiate this class three times (as 3 threads), are there 3 separate and unrelated M and I variables? Or do all 3 instances share the same M and I variable?
If a class has several re-entrant methods (eg: slots), and they access M or I, are they accessing the M or I of that one instance of the class?
How can I give each INSTANCE of the class it's own variable (not accessible to other instances)