< prev index next > test/jdk/java/lang/ScopedValue/ManyBindings.java
Print this page
* questions.
*/
/*
* @test
! * @summary Stress test ScopedValue with many bindings and rebinings
! * @modules jdk.incubator.concurrent
* @library /test/lib
* @key randomness
* @run junit ManyBindings
*/
! import jdk.incubator.concurrent.ScopedValue;
- import jdk.incubator.concurrent.ScopedValue.Carrier;
import java.util.Arrays;
import java.util.Objects;
import java.util.Random;
import jdk.test.lib.RandomFactory;
* questions.
*/
/*
* @test
! * @summary Stress test ScopedValue with many bindings and rebindings
! * @enablePreview
* @library /test/lib
* @key randomness
* @run junit ManyBindings
*/
! import java.lang.ScopedValue.Carrier;
import java.util.Arrays;
import java.util.Objects;
import java.util.Random;
import jdk.test.lib.RandomFactory;
// invoke recursively
carrier.run(() -> {
test(newArray, depth+1);
});
! // check that the scoped values have the origina values
check(array);
}
/**
* Check that the given scoped values have the expected value.
// invoke recursively
carrier.run(() -> {
test(newArray, depth+1);
});
! // check that the scoped values have the original values
check(array);
}
/**
* Check that the given scoped values have the expected value.
< prev index next >