THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/07/2010 at 08:06, xxxxxxxx wrote:
Cinema 4D Version: 11.5
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I have some mp threads that are modifying the same data structure (let´s say a class member container) so I would like to lock the access to avoid inter-thread issues. I assume I can use the c4d semaphore?
control thread calls mp threads and each mp thread pushes values into the same container. Of course this appending will most probably interfere with other threads trying to append at the same time.
Where do I define the semaphore? in the class the container is a member of or directly in the mp thread? I tried to do it directly in the mp threads but that doesn´t seem to work. Or do I need to use something else? What are my options?
Thanks in advance