THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/02/2007 at 05:35, xxxxxxxx wrote:
Cinema 4D Version: 9.6
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I know that semaphores are i.e. used to synchronise several threads working on the same data. Now, I have a calculation which can be split into "chunks" and I would like to use several threads (one for each CPU available), each processing one of these chunks.
However, I assume that I will need a semaphore to synchronise the processing of the data, because the thread I am in is in GetVirtualObjects() and my program shall wait until the chunks have been processed until it starts processing other data.
So my question is, are my assumptions about using the semaphore correct? And will I need only 1 semaphore to use it with several threads? or do I need a semaphore for each thread (sounds useless somehow)?
Is there a code example available?
I would highly appreciate any help. Michael W, if you read this, I remember you once worked with semaphores in one of your programs, so any input is also appreciated!
Thank you in advance