[Player Events] Add QS processing, mutex tweaks (#2984)

* [Player Events] Add QS processing, mutex tweaks

* Update ucs.cpp

* Move the size process check out of the server to server networking thread
This commit is contained in:
Chris Miles
2023-02-24 18:01:59 -06:00
committed by GitHub
parent e8f1aa253a
commit bad631df59
5 changed files with 33 additions and 21 deletions
+5 -11
View File
@@ -131,12 +131,6 @@ inline void UpdateWindowTitle(std::string new_title)
#endif
}
void PlayerEventQueueListener() {
while (RunLoops) {
player_event_logs.Process();
Sleep(1000);
}
}
/**
* World process entrypoint
@@ -381,13 +375,9 @@ int main(int argc, char **argv)
}
);
Timer player_event_process_timer(1000);
player_event_logs.SetDatabase(&database)->Init();
if (!RuleB(Logging, PlayerEventsQSProcess)) {
LogInfo("[PlayerEventQueueListener] Booting queue processor");
std::thread(PlayerEventQueueListener).detach();
}
auto loop_fn = [&](EQ::Timer* t) {
Timer::SetCurrentTime();
@@ -435,6 +425,10 @@ int main(int argc, char **argv)
client_list.Process();
if (player_event_process_timer.Check()) {
player_event_logs.Process();
}
if (PurgeInstanceTimer.Check()) {
database.PurgeExpiredInstances();
database.PurgeAllDeletedDataBuckets();