fun <T> T.freeze(): T
Freezes object subgraph reachable from this object. Frozen objects can be freely shared between threads/workers.
FreezingException
- if freezing is not possible
Return the object itself
See Also
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/freeze.html