Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
MutexedQueue< T > Class Template Reference

#include <container.h>

+ Collaboration diagram for MutexedQueue< T >:

Public Member Functions

 MutexedQueue ()=default
 
bool empty () const
 
void push_back (const T &t)
 
void push_back (T &&t)
 
pop_frontNoEx (u32 wait_time_max_ms)
 
pop_front (u32 wait_time_max_ms)
 
pop_frontNoEx ()
 
pop_back (u32 wait_time_max_ms=0)
 
pop_backNoEx (u32 wait_time_max_ms)
 
pop_backNoEx ()
 

Protected Member Functions

std::mutex & getMutex ()
 
std::deque< T > & getQueue ()
 

Protected Attributes

std::deque< T > m_queue
 
std::mutex m_mutex
 
Semaphore m_signal
 

Friends

template<typename Key , typename U , typename Caller , typename CallerData >
class RequestQueue
 

Constructor & Destructor Documentation

◆ MutexedQueue()

template<typename T >
MutexedQueue< T >::MutexedQueue ( )
default

Member Function Documentation

◆ empty()

template<typename T >
bool MutexedQueue< T >::empty ( ) const
inline

References MutexedQueue< T >::m_mutex, and MutexedQueue< T >::m_queue.

Referenced by Server::AsyncRunStep(), RequestQueue< Key, T, Caller, CallerData >::empty(), and MeshUpdateManager::getNextResult().

+ Here is the caller graph for this function:

◆ getMutex()

template<typename T >
std::mutex & MutexedQueue< T >::getMutex ( )
inlineprotected

References MutexedQueue< T >::m_mutex.

Referenced by RequestQueue< Key, T, Caller, CallerData >::add().

+ Here is the caller graph for this function:

◆ getQueue()

template<typename T >
std::deque< T > & MutexedQueue< T >::getQueue ( )
inlineprotected

References MutexedQueue< T >::m_queue.

Referenced by RequestQueue< Key, T, Caller, CallerData >::add().

+ Here is the caller graph for this function:

◆ pop_back()

template<typename T >
T MutexedQueue< T >::pop_back ( u32 wait_time_max_ms = 0)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

+ Here is the call graph for this function:

◆ pop_backNoEx() [1/2]

template<typename T >
T MutexedQueue< T >::pop_backNoEx ( )
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

+ Here is the call graph for this function:

◆ pop_backNoEx() [2/2]

template<typename T >
T MutexedQueue< T >::pop_backNoEx ( u32 wait_time_max_ms)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

+ Here is the call graph for this function:

◆ pop_front()

template<typename T >
T MutexedQueue< T >::pop_front ( u32 wait_time_max_ms)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

Referenced by TextureSource::getTextureId(), RequestQueue< Key, T, Caller, CallerData >::pop(), and con::Connection::waitEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pop_frontNoEx() [1/2]

template<typename T >
T MutexedQueue< T >::pop_frontNoEx ( )
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

+ Here is the call graph for this function:

◆ pop_frontNoEx() [2/2]

template<typename T >
T MutexedQueue< T >::pop_frontNoEx ( u32 wait_time_max_ms)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::wait().

Referenced by sound::ProxySoundManager::~ProxySoundManager(), Server::AsyncRunStep(), MeshUpdateManager::getNextResult(), ShaderSource::getShader(), RequestQueue< Key, T, Caller, CallerData >::pop(), con::ConnectionSendThread::run(), sound::OpenALSoundManager::run(), and sound::ProxySoundManager::step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push_back() [1/2]

template<typename T >
void MutexedQueue< T >::push_back ( const T & t)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::post().

Referenced by RequestQueue< Key, T, Caller, CallerData >::add(), Server::AsyncRunStep(), Server::DeleteClient(), Server::handleAdminChat(), TermLogOutput::log(), TermLogOutput::logRaw(), Server::notifyPlayer(), Server::printToConsoleOnly(), RequestQueue< Key, T, Caller, CallerData >::pushResult(), con::Connection::putCommand(), con::Connection::putEvent(), MeshUpdateManager::putResult(), sound::OpenALSoundManager::send(), and sound::ProxySoundManager::send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ push_back() [2/2]

template<typename T >
void MutexedQueue< T >::push_back ( T && t)
inline

References MutexedQueue< T >::m_mutex, MutexedQueue< T >::m_queue, MutexedQueue< T >::m_signal, and Semaphore::post().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ RequestQueue

template<typename T >
template<typename Key , typename U , typename Caller , typename CallerData >
friend class RequestQueue
friend

Member Data Documentation

◆ m_mutex

◆ m_queue

◆ m_signal


The documentation for this class was generated from the following file: