示例:
class SomeService {
val threadPool = Executors.newCachedThreadPool()
fun foo() {
threadPool.submit(object : Runnable {
override fun run() {
println("hello")
}
})
}
}
在应用快速修复后:
fun foo() {
threadPool.submit { println("hello") }
}