mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8306647: Implementation of Structured Concurrency (Preview)
8306572: Implementation of Scoped Values (Preview) Co-authored-by: Alan Bateman <alanb@openjdk.org> Co-authored-by: Andrew Haley <aph@openjdk.org> Reviewed-by: psandoz, dfuchs, mchung
This commit is contained in:
parent
a08c5cb3f1
commit
f1c7afcc3f
36 changed files with 3510 additions and 2969 deletions
|
@ -37,9 +37,9 @@ import java.util.Map;
|
|||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.StructureViolationException;
|
||||
import java.util.concurrent.locks.LockSupport;
|
||||
import jdk.internal.event.ThreadSleepEvent;
|
||||
import jdk.internal.misc.StructureViolationExceptions;
|
||||
import jdk.internal.misc.TerminatingThreadLocal;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.misc.VM;
|
||||
|
@ -321,7 +321,7 @@ public class Thread implements Runnable {
|
|||
// bindings established for running/calling an operation
|
||||
Object bindings = snapshot.scopedValueBindings();
|
||||
if (currentThread().scopedValueBindings != bindings) {
|
||||
StructureViolationExceptions.throwException("Scoped value bindings have changed");
|
||||
throw new StructureViolationException("Scoped value bindings have changed");
|
||||
}
|
||||
|
||||
this.scopedValueBindings = bindings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue