mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
Disable watchdog with environment variable
This commit is contained in:
parent
da3d5a92d9
commit
a7d507e9fd
2 changed files with 8 additions and 5 deletions
|
@ -289,6 +289,10 @@ static QTimer locationUpdateTimer;
|
||||||
static QTimer identityPacketTimer;
|
static QTimer identityPacketTimer;
|
||||||
static QTimer pingTimer;
|
static QTimer pingTimer;
|
||||||
|
|
||||||
|
static const QString DISABLE_WATCHDOG_FLAG("HIFI_DISABLE_WATCHDOG");
|
||||||
|
static bool DISABLE_WATCHDOG = QProcessEnvironment::systemEnvironment().contains(DISABLE_WATCHDOG_FLAG);
|
||||||
|
|
||||||
|
|
||||||
static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;
|
static const int MAX_CONCURRENT_RESOURCE_DOWNLOADS = 16;
|
||||||
|
|
||||||
// For processing on QThreadPool, we target a number of threads after reserving some
|
// For processing on QThreadPool, we target a number of threads after reserving some
|
||||||
|
@ -805,8 +809,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
nodeList->startThread();
|
nodeList->startThread();
|
||||||
|
|
||||||
// Set up a watchdog thread to intentionally crash the application on deadlocks
|
// Set up a watchdog thread to intentionally crash the application on deadlocks
|
||||||
_deadlockWatchdogThread = new DeadlockWatchdogThread();
|
if (!DISABLE_WATCHDOG) {
|
||||||
_deadlockWatchdogThread->start();
|
(new DeadlockWatchdogThread())->start();
|
||||||
|
}
|
||||||
|
|
||||||
if (steamClient) {
|
if (steamClient) {
|
||||||
qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
|
qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << steamClient->getSteamVRBuildID();
|
||||||
|
@ -1933,7 +1938,7 @@ void Application::showCursor(const Cursor::Icon& cursor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::updateHeartbeat() const {
|
void Application::updateHeartbeat() const {
|
||||||
static_cast<DeadlockWatchdogThread*>(_deadlockWatchdogThread)->updateHeartbeat();
|
DeadlockWatchdogThread::updateHeartbeat();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::onAboutToQuit() {
|
void Application::onAboutToQuit() {
|
||||||
|
|
|
@ -650,8 +650,6 @@ private:
|
||||||
Qt::CursorShape _desiredCursor{ Qt::BlankCursor };
|
Qt::CursorShape _desiredCursor{ Qt::BlankCursor };
|
||||||
bool _cursorNeedsChanging { false };
|
bool _cursorNeedsChanging { false };
|
||||||
|
|
||||||
QThread* _deadlockWatchdogThread;
|
|
||||||
|
|
||||||
std::map<void*, std::function<void()>> _postUpdateLambdas;
|
std::map<void*, std::function<void()>> _postUpdateLambdas;
|
||||||
std::mutex _postUpdateLambdasLock;
|
std::mutex _postUpdateLambdasLock;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue