- attempt to see if this fixes thread locking performance issues in windows

This commit is contained in:
SoftCoder
2015-11-21 10:23:45 -08:00
parent fcbf254a05
commit 9e0d227172
2 changed files with 4 additions and 3 deletions

View File

@@ -664,8 +664,9 @@ void LogFileThread::addLogEntry(SystemFlags::DebugType type, string logEntry) {
bool LogFileThread::checkSaveCurrentLogBufferToDisk() { bool LogFileThread::checkSaveCurrentLogBufferToDisk() {
bool ret = false; bool ret = false;
if(difftime(time(NULL),lastSaveToDisk) >= 5 || if(difftime(time(NULL),lastSaveToDisk) >= 5.0 ||
LogFileThread::getLogEntryBufferCount() >= 1000000) { (difftime(time(NULL), lastSaveToDisk) >= 2.0 &&
LogFileThread::getLogEntryBufferCount() >= 1000000)) {
lastSaveToDisk = time(NULL); lastSaveToDisk = time(NULL);
ret = true; ret = true;
} }

View File

@@ -1703,7 +1703,7 @@ bool Socket::isReadable(bool lockMutex) {
MutexSafeWrapper safeMutex(NULL,CODE_AT_LINE); MutexSafeWrapper safeMutex(NULL,CODE_AT_LINE);
if(lockMutex == true) { if(lockMutex == true) {
safeMutex.setMutex(dataSynchAccessorRead,CODE_AT_LINE); //safeMutex.setMutex(dataSynchAccessorRead,CODE_AT_LINE);
} }
if(isSocketValid() == false) return false; if(isSocketValid() == false) return false;