Files
oak-editor/app/common/threadedobject.h
T
lightyear15 2453b1d10c Code Cleanup: common: removing default constructors
As C++11 is the adopted standard, trivial constructors are not needed,
compiler can generate it for us.
2019-10-26 21:39:34 +02:00

25 lines
366 B
C++

#ifndef THREADEDOBJECT_H
#define THREADEDOBJECT_H
#include <QMutex>
class ThreadedObject
{
public:
void LockMutex();
void UnlockMutex();
bool TryLockMutex(int timeout = 0);
void LockDeletes();
void UnlockDeletes();
bool AreDeletesLocked();
private:
QMutex threadobj_main_lock_;
QAtomicInt threadobj_delete_lock_;
};
#endif // THREADEDOBJECT_H