You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return (T) instances.computeIfAbsent(contextual, c -> newInstance<>(contextual, creationalContext)).get();
You are using a ConcurrentHashMap to maintain the instances. However, concurrent hash maps can call the lambda multiple times in an invocation. This means you create the object multiple times but loose the reference since only the last successful time is remembered.
The text was updated successfully, but these errors were encountered:
microscoped/microscoped-core/src/main/java/org/tomitribe/microscoped/core/Scope.java
Line 27 in a6d8cc5
microscoped/microscoped-core/src/main/java/org/tomitribe/microscoped/core/Scope.java
Line 46 in a6d8cc5
You are using a ConcurrentHashMap to maintain the instances. However, concurrent hash maps can call the lambda multiple times in an invocation. This means you create the object multiple times but loose the reference since only the last successful time is remembered.
The text was updated successfully, but these errors were encountered: