|
Boost Users : |
Subject: Re: [Boost-users] Thread synchronization
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-12-08 13:04:40
Le 07/12/13 01:14, Gonzalo Garramuno a écrit :
> On 06/12/13 18:23, Vicente J. Botet Escriba wrote:
>> 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
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net