SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Push()

template<typename T >
void scl::thread_queue< T >::Push ( T && item)

Push a item to this queue.

Parameters
[in]itemQueue item.

Definition at line 77 of file ThreadQueue.h.

78 {
79 std::unique_lock<std::mutex> lock(m_Mutex);
80
81 m_Queue.push(item);
82 ++m_Count;
83
84 m_NotEmpty.notify_all();
85 }
std::mutex m_Mutex
Mutex of this queue.
Definition ThreadQueue.h:58
std::atomic_int m_Count
Count of tasks.
Definition ThreadQueue.h:68
std::condition_variable m_NotEmpty
Not empty condition.
Definition ThreadQueue.h:63
std::queue< T > m_Queue
This wrapped queue.
Definition ThreadQueue.h:73

References scl::thread_queue< T >::m_NotEmpty.