Making a cList object thread safe?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 thread will only 
read the list.
So e.g. a reload in the main thread could cause a crash in the 
background thread, if it just loops through the list.

There are already some synchronisation methods in VDR (cMutex, 
cThreadLock,...). Is there any preferred method to solve my problem? Is 
there any plugin that already handled and solved this?

Thanks,

Christian





[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux