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

@@ -0,0 +1,15 @@
package net.torvald.terrarum.gameactors
import net.torvald.terrarum.Terrarum
import org.newdawn.slick.GameContainer
/**
* Created by minjaesong on 16-05-25.
*/
class ThreadActorUpdate(val startIndex: Int, val endIndex: Int,
val gc: GameContainer, val delta: Int) : Runnable {
override fun run() {
for (i in startIndex..endIndex)
Terrarum.game.actorContainer[i].update(gc, delta)
}
}