< prev index next >

test/jdk/javax/security/auth/Subject/CallAsWithScopedValue.java

Print this page
@@ -64,11 +64,12 @@
              return null;
          });
  
          // Observable in structured concurrency in SV mode, but not in ACC mode
          Subject.callAs(subject, () -> {
-             try (var scope = new StructuredTaskScope<>()) {
+             var joiner = StructuredTaskScope.Joiner.awaitAll();
+             try (var scope = StructuredTaskScope.open(joiner)) {
                  scope.fork(() -> check(3, Subject.current(), usv ? "Duke" : null));
                  scope.join();
              }
              return null;
          });
< prev index next >