https://kotlinlang.org logo
t

treelzebub

09/06/2017, 11:36 PM
I just stumbled across this syntax for a synchronized val getter. Strangely, it doesn't seem to be documented anywhere. is
@Synchronized get()
preferred?
Copy code
@get:Synchronized
val things: List<Thing>
    get() = thingMap.values.toList()