UserMsg Pile   version 0.0.1
UserMsg pile.
usermsgman.cc File Reference

Definitions for Example class. More...

#include "usermsgman.h"
#include "usermsg-private.h"
#include "usermsg.h"
#include "usermsgstg.h"
#include <QThread>
#include <QTextStream>
#include <QDir>
#include <QRegularExpression>
#include <QStandardPaths>

Macros

#define UM_AQUIRE_LOCK
 Aquire the lock; wait for it if necesary. More...
 
#define UM_RELEASE_LOCK
 Release the lock. More...
 

Enumerations

enum  LockState { StateLocked, StateUnlocked }
 

Detailed Description

Definitions for Example class.

Author
Nicu Tofan nicu..nosp@m.tofa.nosp@m.n@gma.nosp@m.il.c.nosp@m.om

Macro Definition Documentation

#define UM_AQUIRE_LOCK
Value:
while (!singleton_->lock_.testAndSetAcquire (StateUnlocked, StateLocked)) { \
QThread::usleep (50); \
}

Aquire the lock; wait for it if necesary.

#define UM_RELEASE_LOCK
Value:
while (!singleton_->lock_.testAndSetRelease (StateLocked, StateUnlocked)) { \
QThread::usleep (50); \
}

Release the lock.