Going to fix demuxer

This commit is contained in:
Nekotekina 2014-12-03 16:21:58 +03:00
parent b942da3f68
commit 8cb8298c03
4 changed files with 119 additions and 117 deletions

View file

@ -5,7 +5,7 @@ static const volatile bool sq_no_wait = true;
template<typename T, u32 SQSize = 666>
class SQueue
{
std::mutex m_mutex;
mutable std::mutex m_mutex;
u32 m_pos;
u32 m_count;
T m_data[SQSize];
@ -17,11 +17,16 @@ public:
{
}
const u32 GetSize() const
u32 GetSize() const
{
return SQSize;
}
bool IsFull() const volatile
{
return m_count == SQSize;
}
bool Push(const T& data, const volatile bool* do_exit)
{
while (true)