New posts
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import java.util.concurrent.StructuredTaskScope;
|
||||
|
||||
/** Standalone probe, not part of the Maven build: is StructuredTaskScope usable on this JDK without flags? */
|
||||
public class ScopeProbe {
|
||||
public static void main(String[] args) throws Exception {
|
||||
try (var scope = StructuredTaskScope.open()) {
|
||||
var a = scope.fork(() -> "security: ok");
|
||||
var b = scope.fork(() -> "performance: ok");
|
||||
scope.join();
|
||||
System.out.println(a.get() + " | " + b.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user