SCL RuntimeModule.getValue does not synchronize valueCache modifications properly
It is very likely, especially in the presence of multiple DB QueryThreads, that multiple threads will arrive at the same RuntimeMode
at RuntimeModule.getValue
and there is absolutely no synchronization in the current implementation for the THashMap valueCache
structure.
RuntimeModule.getValue
is used by most client code to retrieve values from SCL modules and since it introduces caching, the caching should be thread-safe.
Cache hits should be as efficient as possible. It's OK to synchronize the code that performs the computation on a cache miss.
Edited by Tuukka Lehtonen