< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] maybe have a bug in Condition::wait()


resiprocate-devel, Hello
 
In my win32 project, I used DumThread, AbstractFifo::getNext(int ms) will be called in DumThread.
When I run my program, Sometimes it will prompt me "Assertion failed: mSize!=0, file AbstractFifo.cxx, line 57". I think maybe have some problems in function Condition.wait(), because it returns true but mFifo is empty.
So I changed some codes as follows, and it runs well.
 
In function:
AbstractFifo::getNext(int ms)
{
    ....
   if (mFifo.empty())
   {
      bool signaled = mCondition.wait(mMutex, ms);
      if (!signaled || mFifo.empty())             //Changed by NOIILE;
      {
        return 0;
      }
   }
   
    ....
}
 
 

2005-10-18