Index: src/libchcore/TOrderedBufferQueue.h =================================================================== diff -u -N -r518d1a3484cde91ff17c071211df5e40cb3487e3 -rd99302fce795dbb5139659016a5da7948f141fb4 --- src/libchcore/TOrderedBufferQueue.h (.../TOrderedBufferQueue.h) (revision 518d1a3484cde91ff17c071211df5e40cb3487e3) +++ src/libchcore/TOrderedBufferQueue.h (.../TOrderedBufferQueue.h) (revision d99302fce795dbb5139659016a5da7948f141fb4) @@ -24,7 +24,7 @@ #include "TOverlappedDataBuffer.h" #include "TBufferList.h" #include "TCoreException.h" -#include +#include namespace chcore { @@ -57,10 +57,10 @@ void ClearBuffers(); - boost::signals2::signal& GetNotifier(); - void UpdateProcessingRange(unsigned long long ullNewPosition); + TSharedCountMTPtr GetSharedCount(); + private: void UpdateHasBuffers(); void UpdateHasErrors(); @@ -71,10 +71,11 @@ private: using BufferCollection = std::set; BufferCollection m_setBuffers; + TSharedCountMTPtr m_spBuffersCount; TBufferListPtr m_spEmptyBuffers; - mutable boost::shared_mutex m_mutex; + mutable boost::recursive_mutex m_mutex; TOverlappedDataBuffer* m_pFirstErrorBuffer = nullptr; unsigned long long m_ullErrorPosition = NoPosition; @@ -85,8 +86,6 @@ unsigned long long m_ullExpectedBufferPosition = 0; bool m_bDataSourceFinished = false; - - boost::signals2::signal m_notifier; }; template @@ -97,7 +96,7 @@ if(!pBuffer->HasError()) throw TCoreException(eErr_InvalidArgument, L"Cannot push successful buffer to failed queue", LOCATION); - boost::unique_lock lock(m_mutex); + boost::unique_lock lock(m_mutex); if(!m_pFirstErrorBuffer && m_ullErrorPosition == NoPosition) {