Doug Mika <
doug...@gmail.com> wrote:
> On Friday, July 24, 2015 at 2:43:04 PM UTC-5, Melzzzzz wrote:
> > On Fri, 24 Jul 2015 12:28:36 -0700 (PDT)
> > Doug Mika <
doug...@gmail.com> wrote:
> >
> > > Hi, I am trying to use two threads to solve the Fibanacci numbers
> > > (for educational purposes only). But why when in main() does my
> > > cvOne.notify_all() not notify my thread t1 that it may proceed
> > > past its wait()? (ie. why does the following program not proceed?)
> >
> > Because both threads are waiting on condition.
>
> Yes, but thread 1 is waiting on condition variable cvOne (which I
> notify), and thread 2 is waiting on condition variable cvTwo (which
> thread 1 is to notify). Why doesn't thread 1 proceed if it's waiting
> on cvOne, and I notify cvOne in main?