Boost logo

Boost Users :

Subject: Re: [Boost-users] Thread synchronization
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-12-06 16:23:31

Le 06/12/13 00:02, Gonzalo Garramuno a écrit :
> I have an application (a video player), that uses three threads to
> play videos (one thread handles decoding, another video display, and
> another audio). These threads have a thread barrier to wait until all
> 3 threads finish. This works fine.
> Now, my video player supports playing back two movies at the same time
> (to have one as a background and one as a foreground). Currently this
> is done with the same code for both.
> My problem is that there's no sync between the two movies and I am
> puzzled on how to achieve synchronism. I am unsure whether a thread
> barrier can be waited twice by two threads or whether I should have a
> single barrier that waits on the 6 threads ( 2 decode, 2 video, 2
> audio ).
> If someone has any insight, it would be appreciated.

Maybe you should group the 3 thread and a barrier as a single data
structure that you instantiate twice.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at