Override toString function in stdlib delegates
Co-authored-by: ilya-g <ilya.gorbunov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
cfa06dbf74
commit
fb80c0cb0d
@@ -23,4 +23,7 @@ private class ThreadLocalDelegate<T>(private val initializer: () -> T) : ReadWri
|
||||
override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: T) {
|
||||
map[Thread.currentThread()] = value
|
||||
}
|
||||
|
||||
override fun toString(): String =
|
||||
"ThreadLocalDelegate(${map.entries.joinToString { "#${it.key.id}=>${it.value}" }})"
|
||||
}
|
||||
Reference in New Issue
Block a user