- attempt to see if this fixes thread locking performance issues in windows
This commit is contained in:
parent
fcbf254a05
commit
9e0d227172
|
@ -664,8 +664,9 @@ void LogFileThread::addLogEntry(SystemFlags::DebugType type, string logEntry) {
|
|||
|
||||
bool LogFileThread::checkSaveCurrentLogBufferToDisk() {
|
||||
bool ret = false;
|
||||
if(difftime(time(NULL),lastSaveToDisk) >= 5 ||
|
||||
LogFileThread::getLogEntryBufferCount() >= 1000000) {
|
||||
if(difftime(time(NULL),lastSaveToDisk) >= 5.0 ||
|
||||
(difftime(time(NULL), lastSaveToDisk) >= 2.0 &&
|
||||
LogFileThread::getLogEntryBufferCount() >= 1000000)) {
|
||||
lastSaveToDisk = time(NULL);
|
||||
ret = true;
|
||||
}
|
||||
|
|
|
@ -1703,7 +1703,7 @@ bool Socket::isReadable(bool lockMutex) {
|
|||
|
||||
MutexSafeWrapper safeMutex(NULL,CODE_AT_LINE);
|
||||
if(lockMutex == true) {
|
||||
safeMutex.setMutex(dataSynchAccessorRead,CODE_AT_LINE);
|
||||
//safeMutex.setMutex(dataSynchAccessorRead,CODE_AT_LINE);
|
||||
}
|
||||
|
||||
if(isSocketValid() == false) return false;
|
||||
|
|
Loading…
Reference in New Issue