CIRCT
19.0.0git
|
Thread safe queue. Just wraps std::queue protected with a lock. More...
#include <Utils.h>
Public Member Functions | |
template<typename... E> | |
void | push (E... t) |
Push onto the queue. More... | |
std::optional< T > | pop () |
Pop something off the queue but return nullopt if the queue is empty. More... | |
Private Types | |
using | Lock = std::lock_guard< std::mutex > |
Private Attributes | |
std::mutex | m |
std::queue< T > | q |
Thread safe queue. Just wraps std::queue protected with a lock.
|
private |
|
inline |
Pop something off the queue but return nullopt if the queue is empty.
Why doesn't std::queue have anything like this?
Definition at line 37 of file Utils.h.
References esi::cosim::TSQueue< T >::m, and esi::cosim::TSQueue< T >::q.
Referenced by sv2cCosimserverMMIOReadTryGet(), and sv2cCosimserverMMIOWriteTryGet().
Push onto the queue.
Definition at line 30 of file Utils.h.
References esi::cosim::TSQueue< T >::m, and esi::cosim::TSQueue< T >::q.
Referenced by sv2cCosimserverMMIOReadRespond(), and sv2cCosimserverMMIOWriteRespond().
|
private |
Definition at line 24 of file Utils.h.
Referenced by esi::cosim::TSQueue< T >::pop(), and esi::cosim::TSQueue< T >::push().
|
private |
Definition at line 25 of file Utils.h.
Referenced by esi::cosim::TSQueue< T >::pop(), and esi::cosim::TSQueue< T >::push().