We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cd40e3 commit f8ff296Copy full SHA for f8ff296
1 file changed
test/micro/org/openjdk/bench/java/lang/ScopedValuesData.java
@@ -57,11 +57,13 @@ public class ScopedValuesData {
57
public static void run(Runnable action) {
58
try {
59
tl1.set(42); tl2.set(2); tl3.set(3); tl4.set(4); tl5.set(5); tl6.set(6);
60
- sl1.get(); // Create the ScopedValue cache as a side effect
61
tl_atomicInt.set(new AtomicInteger());
62
VALUES.where(sl_atomicInt, new AtomicInteger())
63
.where(sl_atomicRef, new AtomicReference<>())
64
- .run(action);
+ .run(() -> {
+ sl1.get(); // Create the ScopedValue cache as a side effect
65
+ action.run();
66
+ });
67
} finally {
68
tl1.remove(); tl2.remove(); tl3.remove(); tl4.remove(); tl5.remove(); tl6.remove();
69
tl_atomicInt.remove();
0 commit comments