This commit is contained in:
Branimir Karadžić
2017-02-16 21:07:25 -08:00
parent e70a583103
commit 1460b6139d
3 changed files with 1 additions and 34 deletions

View File

@@ -29,7 +29,7 @@ namespace bx
void push(Ty* _ptr) // producer only
{
LwMutexScope lock(m_write);
MutexScope lock(m_write);
m_queue.push(_ptr);
}

View File

@@ -57,28 +57,6 @@ namespace bx
Mutex& m_mutex;
};
typedef Mutex LwMutex;
///
class LwMutexScope
{
BX_CLASS(LwMutexScope
, NO_DEFAULT_CTOR
, NO_COPY
, NO_ASSIGNMENT
);
public:
///
LwMutexScope(LwMutex& _mutex);
///
~LwMutexScope();
private:
LwMutex& m_mutex;
};
} // namespace bx
#include "mutex.inl"

View File

@@ -20,15 +20,4 @@ namespace bx
m_mutex.unlock();
}
inline LwMutexScope::LwMutexScope(LwMutex& _mutex)
: m_mutex(_mutex)
{
m_mutex.lock();
}
inline LwMutexScope::~LwMutexScope()
{
m_mutex.unlock();
}
} // namespace bx