-
- Downloads
[Core] Add TClass::GetClass<T> method to lower contention
The method TClass::GetClass<T> obtains the TClass instance pointer corresponding to T in two ways, according to the nature of T. If T inherits from or is TObject, the TClass* value is obtained via the T::Class() static method, which locks only upon the first call. If T is a generic type, internally the TClass::GetClass(type_info, ...) method is called. The new functionality is put to a good use by this commit in TBuffer and TDirectoryFile. It is worth noting how the usage of tag dispatching could be replaced by 'if constexpr'.
Loading
Please register or sign in to comment