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

@:keepnew()

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

@:keepvalue:T

Available on cpp, neko, java

value:T

Available on python

read onlywrite onlyvalue:T

Available on hl, macro