Christian Wieninger wrote:
Thanks! So the following should work (please correct me if I'm wrong):
I add a cMutex object in the cList derived class and 2 functions:
class cThreadSafecList: public cList<...> {
...
private:
cMutex mutex;
public:
void Lock(void) { mutex.Lock(); }
void Unloc
You have to protect all functions of your object which are
dealing with the list (reading and/or writing) with a cMutex.
Thanks! So the following should work (please correct me if I'm wrong):
I add a cMutex object in the cList derived class and 2 functions:
class cThreadSafecList: public c
On 20 Aug 2006 Christian Wieninger <[EMAIL PROTECTED]> wrote:
> what is the best way to make a cList derived object thread safe?
You have to protect all functions of your object which are
dealing with the list (reading and/or writing) with a cMutex.
Alternatively you could use a cRwLock, but thi
Hi,
what is the best way to make a cList derived object thread safe?
I have an object derived from cList and access it in the main thread and
also in a background thread.
The main thread access can modify the object (insert, edit, delete or
even reload the complete list) while the background t