
Le 07/12/13 01:14, Gonzalo Garramuno a écrit :
Hi, Maybe you should group the 3 thread and a barrier as a single data structure that you instantiate twice.
Best, Vicente Maybe I wasn't clear. I am doing just that right now. The problem is
On 06/12/13 18:23, Vicente J. Botet Escriba wrote: that the two barriers need to be in sync, so the foreground video and background video end together. I don't know whether I can have the foreground decode thread wait on the background barrier while the background barrier also waits in its own decode thread. Or whether I should go with a single barrier for both the background and the foreground. I can not help you to define the problem you need to solve ;-) If you clarify the synchronization points between the 6 threads tis would surely help. Take in account that we are not aware of your problem domain
Maybe you just need to have 3 barriers, one for each group of the 3 threads and an additional one to synchronize the end of the 6 threads. HTH, Vicente