kotlin.concurrent.java.lang.ThreadLocal

Extensions for java.lang.ThreadLocal

getOrSet

fun <T : Any> ThreadLocal<T>.getOrSet(default: () -> T): T

Gets the value in the current thread's copy of this thread-local variable or replaces the value with the result of calling 登录查看完整内容