Files
kotlin/compiler/testData/codegen/boxWithStdlib/fullJdk/ifInWhile.kt
2013-02-11 02:01:41 +04:00

14 lines
296 B
Kotlin

import java.lang.Runtime
fun box() : String {
val processors = Runtime.getRuntime()!!.availableProcessors()
var threadNum = 1
while(threadNum <= 1024) {
if(threadNum < 2 * processors)
threadNum += 1
else
threadNum *= 2
}
return "OK"
}