So it seems not related to multi-threading but rather to the fact that the value obtained from possibleValueExtractorsByRuntimeType is always re-added later on, wrapped into an immutable set. So after some time this will produce the stack overflow. Instead, the write to the cache should only happen once upon initial retrieval of the value. |