
Uniqueness of Data in Managed TLS
Whether you use thread-relative static fields or data slots, data in managed TLS is unique to the combination of thread and application domain.
Within an application domain, one thread cannot modify data from another thread, even when both threads use the same field or slot.
When a thread accesses the same field or slot from multiple application domains, a separate value is maintained in each application domain.
For example, if a thread sets the value of a thread-relative static field, enters another application domain, and then retrieves the value of the field, the value retrieved in the second application domain differs from the value in the first application domain. Setting a new value for the field in the second application domain does not affect the field's value in the first application domain.
Similarly, when a thread gets the same named data slot in two different application domains, the data in the first application domain remains independent of the data in the second application domain.