Add a generic worker thread pool job executor mechanism
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
#include "debug_desync.h"
|
||||
#include "event_logs.h"
|
||||
#include "tunnelbridge.h"
|
||||
#include "worker_thread.h"
|
||||
|
||||
#include "linkgraph/linkgraphschedule.h"
|
||||
#include "tracerestrict.h"
|
||||
@@ -991,8 +992,12 @@ int openttd_main(int argc, char *argv[])
|
||||
/* ScanNewGRFFiles now has control over the scanner. */
|
||||
RequestNewGRFScan(scanner.release());
|
||||
|
||||
_general_worker_pool.Start("ottd:worker", 8);
|
||||
|
||||
VideoDriver::GetInstance()->MainLoop();
|
||||
|
||||
_general_worker_pool.Stop();
|
||||
|
||||
WaitTillSaved();
|
||||
|
||||
/* only save config if we have to */
|
||||
|
Reference in New Issue
Block a user