mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
WorkQueueThread: Add Push
This commit is contained in:

committed by
Scott Mansell

parent
512273a507
commit
9badcc6eb8
@ -42,6 +42,26 @@ public:
|
|||||||
m_wakeup.Set();
|
m_wakeup.Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Push(T&& item)
|
||||||
|
{
|
||||||
|
if (!m_cancelled.IsSet())
|
||||||
|
{
|
||||||
|
std::lock_guard lg(m_lock);
|
||||||
|
m_items.push(item);
|
||||||
|
}
|
||||||
|
m_wakeup.Set();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Push(const T& item)
|
||||||
|
{
|
||||||
|
if (!m_cancelled.IsSet())
|
||||||
|
{
|
||||||
|
std::lock_guard lg(m_lock);
|
||||||
|
m_items.push(item);
|
||||||
|
}
|
||||||
|
m_wakeup.Set();
|
||||||
|
}
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user