vonox7
04/11/2017, 5:03 PMfun runAsync1(task: () -> Unit) {
thread {
try { task() }
catch (e: Exception) { e.printStackTrace() }
}
}
fun runAsync2(task: suspend CoroutineScope.() -> Unit) {
launch(CommonPool, start = true) {
try { task() }
catch (e: Exception) { e.printStackTrace() }
}
}