Как инициализировать поток в Котлине? ⇐ JAVA
-
Anonymous
Как инициализировать поток в Котлине?
In Java it works by accepting an object which implements runnable :
Thread myThread = new Thread(new myRunnable()) where myRunnable is a class implementing Runnable.
But when I tried this in Kotlin, it doesn't seems to work:
var myThread:Thread = myRunnable:Runnable
Источник: https://stackoverflow.com/questions/465 ... -in-kotlin
In Java it works by accepting an object which implements runnable :
Thread myThread = new Thread(new myRunnable()) where myRunnable is a class implementing Runnable.
But when I tried this in Kotlin, it doesn't seems to work:
var myThread:Thread = myRunnable:Runnable
Источник: https://stackoverflow.com/questions/465 ... -in-kotlin