mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-04-25 18:31:46 -05:00
92775f444c
While ORM can be disabled, Orm::Utils has been split into Orm::Utils and Orm::Tiny::Utils (Orm::Tiny::TinyUtils alias). So when ORM is disabled then utils used only in the ORM will be excluded from a final build. - bugfix cmake undefined ORM option in TinySources
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#pragma once
|
|
#ifndef ORM_UTILS_THREAD_HPP
|
|
#define ORM_UTILS_THREAD_HPP
|
|
|
|
#include "orm/macros/systemheader.hpp"
|
|
TINY_SYSTEM_HEADER
|
|
|
|
#include <QtGlobal>
|
|
|
|
#include "orm/macros/commonnamespace.hpp"
|
|
#include "orm/macros/export.hpp"
|
|
|
|
TINYORM_BEGIN_COMMON_NAMESPACE
|
|
|
|
namespace Orm::Utils
|
|
{
|
|
|
|
/*! Library class for Thread specific code. */
|
|
class SHAREDLIB_EXPORT Thread
|
|
{
|
|
Q_DISABLE_COPY(Thread)
|
|
|
|
public:
|
|
/*! Deleted default constructor, this is a pure library class. */
|
|
Thread() = delete;
|
|
/*! Deleted destructor. */
|
|
~Thread() = delete;
|
|
|
|
/*! Set thread name for debugger, -1 for a current thread. */
|
|
[[maybe_unused]]
|
|
static void nameThreadForDebugging(
|
|
const QString &threadName,
|
|
quint64 threadId = static_cast<quint64>(-1));
|
|
/*! Set thread name for debugger, -1 for a current thread. */
|
|
[[maybe_unused]]
|
|
static void nameThreadForDebugging(
|
|
const char *threadName,
|
|
quint64 threadId = static_cast<quint64>(-1));
|
|
};
|
|
|
|
} // namespace Orm::Utils
|
|
|
|
TINYORM_END_COMMON_NAMESPACE
|
|
|
|
#endif // ORM_UTILS_THREAD_HPP
|