Index: src/libchcore/TBufferList.cpp =================================================================== diff -u -N -r6c41e7b3cf7711c6f5027c0c0154013f50f08e7b -r593ca68706f3a3c7c2a3820b02a56fc24d5bea11 --- src/libchcore/TBufferList.cpp (.../TBufferList.cpp) (revision 6c41e7b3cf7711c6f5027c0c0154013f50f08e7b) +++ src/libchcore/TBufferList.cpp (.../TBufferList.cpp) (revision 593ca68706f3a3c7c2a3820b02a56fc24d5bea11) @@ -22,7 +22,8 @@ namespace chcore { - TBufferList::TBufferList() + TBufferList::TBufferList() : + m_eventAllBuffersAccountedFor(true, true) { } @@ -32,6 +33,7 @@ throw TCoreException(eErr_InvalidArgument, L"pBuffer", LOCATION); m_listBuffers.push_front(pBuffer); + UpdateEvent(); m_notifier(true); } @@ -43,6 +45,8 @@ TOverlappedDataBuffer* pBuffer = m_listBuffers.front(); m_listBuffers.pop_front(); + UpdateEvent(); + m_notifier(false); return pBuffer; @@ -54,7 +58,10 @@ m_listBuffers.clear(); if (bRemoved) + { + UpdateEvent(); m_notifier(false); + } } size_t TBufferList::GetCount() const @@ -71,4 +78,9 @@ { return m_notifier; } + + void TBufferList::UpdateEvent() + { + m_eventAllBuffersAccountedFor.SetEvent(m_listBuffers.size() == m_stExpectedBuffers); + } }