new thread pooling strategy and test program WIP

This commit is contained in:
Minjae Song
2018-12-14 22:53:25 +09:00
parent 6f49dcff4b
commit 513c5a17eb
8 changed files with 231 additions and 32 deletions

View File

@@ -869,7 +869,7 @@ open class Ingame(batch: SpriteBatch) : IngameInstance(batch) {
}
private fun insertionSortLastElemAV(arr: ArrayList<ActorWithBody>) { // out-projection doesn't work, duh
lock(ReentrantLock()) {
ReentrantLock().lock {
var j = arr.lastIndex - 1
val x = arr.last()
while (j >= 0 && arr[j] > x) {