Remove unneeded zeroing TLS (#4480)

This commit is contained in:
Alexander Shabalin
2020-10-29 22:20:31 +03:00
committed by Stanislav Erokhin
parent 1a97a6ca1a
commit 4297b521e4
5 changed files with 25 additions and 12 deletions
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
import kotlin.native.concurrent.*
@ThreadLocal
var x = Any()
fun main() {
val worker = Worker.start()
worker.execute(TransferMode.SAFE, {}) {
println(x) // Make sure x is initialized
}.result
worker.requestTermination().result
}