Tls<T>

package sys.thread

Available on neko, cpp, macro, java, hl

Creates thread local storage.

(hl) Warning: At the moment Tls does not protect the value from being garbage collected. Keep the value reachable to avoid crashes.

Constructor

new()

Creates thread local storage. This is placeholder that can store a value that will be different depending on the local thread. Set the tls value to null before exiting the thread or the memory will never be collected.

Variables

value:T

Available on neko, cpp, java

read onlywrite onlyvalue:T

Available on macro, hl

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/sys/thread/Tls.html