Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
RequestQueue< Key, T, Caller, CallerData > Class Template Reference

Notes for RequestQueue usage. More...

#include <thread.h>

+ Collaboration diagram for RequestQueue< Key, T, Caller, CallerData >:

Public Member Functions

bool empty ()
 
void add (const Key &key, Caller caller, CallerData callerdata, ResultQueue< Key, T, Caller, CallerData > *dest)
 
GetRequest< Key, T, Caller, CallerData > pop (unsigned int timeout_ms)
 
GetRequest< Key, T, Caller, CallerData > pop ()
 
void pushResult (GetRequest< Key, T, Caller, CallerData > req, T res)
 

Private Attributes

MutexedQueue< GetRequest< Key, T, Caller, CallerData > > m_queue
 

Detailed Description

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

Notes for RequestQueue usage.

Parameters
Keyunique key to identify a request for a specific resource
T?
Callerunique id of calling thread
CallerDatadata passed back to caller

Member Function Documentation

◆ add()

template<typename Key , typename T , typename Caller , typename CallerData >
void RequestQueue< Key, T, Caller, CallerData >::add ( const Key & key,
Caller caller,
CallerData callerdata,
ResultQueue< Key, T, Caller, CallerData > * dest )
inline

References CallerInfo< Caller, Data, Key, T >::caller, GetRequest< Key, T, Caller, CallerData >::callers, CallerInfo< Caller, Data, Key, T >::data, CallerInfo< Caller, Data, Key, T >::dest, MutexedQueue< T >::getMutex(), MutexedQueue< T >::getQueue(), GetRequest< Key, T, Caller, CallerData >::key, RequestQueue< Key, T, Caller, CallerData >::m_queue, and MutexedQueue< T >::push_back().

Referenced by TextureSource::getTextureId().

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

◆ empty()

template<typename Key , typename T , typename Caller , typename CallerData >
bool RequestQueue< Key, T, Caller, CallerData >::empty ( )
inline

References MutexedQueue< T >::empty(), and RequestQueue< Key, T, Caller, CallerData >::m_queue.

Referenced by TextureSource::processQueue().

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

◆ pop() [1/2]

template<typename Key , typename T , typename Caller , typename CallerData >
GetRequest< Key, T, Caller, CallerData > RequestQueue< Key, T, Caller, CallerData >::pop ( )
inline

References RequestQueue< Key, T, Caller, CallerData >::m_queue, and MutexedQueue< T >::pop_frontNoEx().

+ Here is the call graph for this function:

◆ pop() [2/2]

template<typename Key , typename T , typename Caller , typename CallerData >
GetRequest< Key, T, Caller, CallerData > RequestQueue< Key, T, Caller, CallerData >::pop ( unsigned int timeout_ms)
inline

References RequestQueue< Key, T, Caller, CallerData >::m_queue, and MutexedQueue< T >::pop_front().

Referenced by TextureSource::processQueue().

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

◆ pushResult()

template<typename Key , typename T , typename Caller , typename CallerData >
void RequestQueue< Key, T, Caller, CallerData >::pushResult ( GetRequest< Key, T, Caller, CallerData > req,
T res )
inline

References CallerInfo< Caller, Data, Key, T >::caller, GetResult< Key, T, Caller, CallerData >::caller, GetRequest< Key, T, Caller, CallerData >::callers, CallerInfo< Caller, Data, Key, T >::data, CallerInfo< Caller, Data, Key, T >::dest, GetResult< Key, T, Caller, CallerData >::item, GetRequest< Key, T, Caller, CallerData >::key, GetResult< Key, T, Caller, CallerData >::key, and MutexedQueue< T >::push_back().

Referenced by TextureSource::processQueue().

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

Member Data Documentation

◆ m_queue

template<typename Key , typename T , typename Caller , typename CallerData >
MutexedQueue<GetRequest<Key, T, Caller, CallerData> > RequestQueue< Key, T, Caller, CallerData >::m_queue
private

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