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 python

value:T

Available on neko, cpp, java

read onlywrite onlyvalue:T

Available on hl, macro