thread pooling terraingen, WIP

Former-commit-id: 1d0687d8b34d5e8192b652904a437cdb29f27b10
Former-commit-id: 1c06ce97a59eb13455cc180a4d5f13ffbead1f84
This commit is contained in:
Song Minjae
2016-06-13 00:48:37 +09:00
parent f98cd773b1
commit 9f42ae9639
8 changed files with 180 additions and 46 deletions

View File

@@ -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
/**