From e1ed2311f3847cbf2a00ad29b8bdfa6811e70515 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 19 Sep 2011 21:13:28 +1000 Subject: [PATCH] Logging is causing a spinlock.. Needs further investigation --- mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 03fd0090..1b47e51f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -32,11 +32,11 @@ QStatusBar *qstatusbar; void MainWindow::Log(QString s) { -// if (!loglock.tryLock()) { -// return; -// } - strlock.lock(); + if (!strlock.tryLock()) + return; + +// strlock.lock(); QString tmp=QString("%1: %2").arg(logtime.elapsed(),5,10,QChar('0')).arg(s); logbuffer.append(tmp); //QStringList appears not to be threadsafe