-
Bug
-
Resolution: Fixed
-
P3
-
19, 21, 22
-
b27
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8331597 | 21.0.5-oracle | Michael McMahon | P3 | Resolved | Fixed | b01 |
JDK-8331971 | 21.0.4-oracle | Michael McMahon | P3 | Resolved | Fixed | b05 |
JDK-8326968 | 21.0.4 | Aleksey Shipilev | P3 | Resolved | Fixed | b01 |
When a virtual thread continues after Thread.yield it consume the thread parking permit:
var thread = Thread.ofVirtual().start(() -> {
LockSupport.unpark(Thread.currentThread());
Thread.yield();
LockSupport.park(); // should not park
});
thread.join();
The parking permit should only be consumed when continuing after park.
var thread = Thread.ofVirtual().start(() -> {
LockSupport.unpark(Thread.currentThread());
Thread.yield();
LockSupport.park(); // should not park
});
thread.join();
The parking permit should only be consumed when continuing after park.
- backported by
-
JDK-8326968 Virtual Thread.yield consumes parking permit
- Resolved
-
JDK-8331597 Virtual Thread.yield consumes parking permit
- Resolved
-
JDK-8331971 Virtual Thread.yield consumes parking permit
- Resolved
- links to
-
Commit openjdk/jdk21u-dev/3eb5517b
-
Commit openjdk/jdk/29d7a223
-
Review openjdk/jdk21u-dev/245
-
Review openjdk/jdk/16953
(2 links to)