mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
thread pooling terraingen, WIP
Former-commit-id: 1d0687d8b34d5e8192b652904a437cdb29f27b10 Former-commit-id: 1c06ce97a59eb13455cc180a4d5f13ffbead1f84
This commit is contained in:
@@ -114,6 +114,15 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
||||
/** Available CPU cores */
|
||||
val CORES = Runtime.getRuntime().availableProcessors();
|
||||
|
||||
/**
|
||||
* If the game is multithreading.
|
||||
* True if:
|
||||
*
|
||||
* CORES >= 2 and config "multithread" is true
|
||||
*/
|
||||
val MULTITHREAD: Boolean
|
||||
get() = CORES >= 2 && getConfigBoolean("multithread")
|
||||
|
||||
private lateinit var configDir: String
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user