Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
Maria::QueueCounter< Key > Class Template Reference

Thread safe class for keeping track of queue counts and queue limits. More...

#include <MQueueCounter.h>

Classes

class  ScopeGuard
 Use to ensure that que counter is always decremented when leaving scope Create on stack, optionally incrementing que counter. More...
 

Public Member Functions

 QueueCounter (int maxCountPerQueue, int maxCountTotal=std::numeric_limits< int >::max())
 
 QueueCounter (const QueueCounter< Key > &src)=delete
 
 QueueCounter (QueueCounter< Key > &&src)=delete
 
QueueCounter< Key > operator= (const QueueCounter< Key > &src)=delete
 
QueueCounter< Key > operator= (QueueCounter< Key > &&src)=delete
 
int MaxCount () const
 
bool TryInc (Key queueId)
 
int Count (Key queueId) const
 
void Dec (Key queueId)
 
int TotalCount () const
 

Detailed Description

template<typename Key = int>
class Maria::QueueCounter< Key >

Thread safe class for keeping track of queue counts and queue limits.


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