W3cubDocs

/Kotlin

freeze

Platform and version requirements: Native (1.3)
fun <T> T.freeze(): T

Freezes object subgraph reachable from this object. Frozen objects can be freely shared between threads/workers.

Exceptions

FreezingException - if freezing is not possible

Return the object itself

See Also

ensureNeverFrozen

© 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