mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
multithreading now should divide jobs evenly without any job missing out
Former-commit-id: 0511065489b0813fef82361b74369040fc2ad887 Former-commit-id: fe23e50fa33d6cf0c5118916bb29669d69bed5b9
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user