mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- attempt to see if this fixes thread locking performance issues in windows
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user