[vdr] Making a cList object thread safe?

Christian Wieninger cwieninger at gmx.de
Sun Aug 20 10:31:10 CEST 2006


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?



More information about the vdr mailing list