Increase the maximum async element list and change the time to wait

This commit is contained in:
Maschell 2020-02-21 14:24:17 +01:00
parent b42b090442
commit c71d820202

View File

@ -21,7 +21,7 @@ AsyncExecutor::AsyncExecutor() {
}
}
instance->mutex.unlock();
std::this_thread::sleep_for(std::chrono::milliseconds(50));
std::this_thread::sleep_for(std::chrono::milliseconds(16));
DCFlushRange((void*)&exitThread, sizeof(exitThread));
}
});
@ -34,8 +34,8 @@ void AsyncExecutor::execute(std::function<void()> func) {
instance = new AsyncExecutor();
}
while(instance->elements.size() > 10) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
while(instance->elements.size() > 25) {
std::this_thread::sleep_for(std::chrono::milliseconds(16));
}
instance->mutex.lock();