WorkQueueThread: Add Push

This commit is contained in:
Robin Kertels 2023-01-27 15:05:51 +01:00 committed by Scott Mansell
parent 512273a507
commit 9badcc6eb8
1 changed files with 20 additions and 0 deletions

View File

@ -42,6 +42,26 @@ public:
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()
{
{