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

Noiile noiile at hotmail.com
Tue Oct 18 06:14:49 CDT 2005


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;
      }
   }
   
    ....
}




Noiile, noiile at hotmail.com
2005-10-18 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20051018/0483cab0/attachment.htm>


More information about the resiprocate-devel mailing list