1dim-ised lightmap

This commit is contained in:
minjaesong
2018-11-16 22:44:54 +09:00
parent d2e6b432a7
commit d7b8acf1c4
5 changed files with 90 additions and 43 deletions

View File

@@ -18,6 +18,16 @@ object ThreadParallel {
pool[index] = Thread(runnable, "$prefix-$index")
}
fun map(index: Int, runFunc: (Int) -> Unit, prefix: String) {
val runnable = object : Runnable {
override fun run() {
runFunc(index)
}
}
map(index, runnable, prefix)
}
/**
* Start all thread in the pool. If the thread in the pool is NULL, it will simply ignored.
*/