xtd 0.2.0
Loading...
Searching...
No Matches

◆ thread_local_object() [2/4]

template<typename value_t >
xtd::threading::thread_local_object< value_t >::thread_local_object ( bool  track_all_values)
inlineexplicit

Initializes the xtd::threading::thread_local_object instance and specifies whether all values are accessible from any thread.

Parameters
track_all_valuestrue to track all values set on the instance and expose them through the xtd::threading::thread_local_object::values property; false otherwise. When set to true, a value stored from a given thread will be available through xtd::threading::thread_local_object::values even after that thread has exited.
Remarks
If track_all_values is false, only the value of this instance for the current thread is accessible. Attempting to use the xtd::threading::thread_local_object::values property to retrieve all values throws an xtd::invalid_operation_exception exception.