multithreading now should divide jobs evenly without any job missing out

Former-commit-id: 0511065489b0813fef82361b74369040fc2ad887
Former-commit-id: fe23e50fa33d6cf0c5118916bb29669d69bed5b9
This commit is contained in:
Song Minjae
2016-12-23 00:38:21 +09:00
parent 1362f6921e
commit 639f1c158e
3 changed files with 31 additions and 12 deletions

View File

@@ -512,8 +512,8 @@ constructor() : BasicGameState() {
ThreadPool.map(
i,
ThreadActorUpdate(
((actors / CORES) * i).toInt(),
((actors / CORES) * i.plus(1)).toInt() - 1,
actors.div(Terrarum.THREADS).times(i).roundInt(),
actors.div(Terrarum.THREADS).times(i.plus(1)).roundInt() - 1,
gc, delta
),
"ActorUpdate"