JDK 17 | JDK 18 | JDK 19 |
---|---|---|
17.0.3Fixed | 18 b29Fixed | 19Fixed |
Relates :
|
SuspendibleThreadSet::should_yield() just returns the value of the _suspend_all flag, which is a simple static variable. That variable is set under a lock, but possibly read concurrently by other threads without any locking. [For considerations of backporting] This is *probably* effectively harmless, as any loops involving should_yield checks probably won't have the check hoisted out of the loop due to sufficiently opaque loop bodies.
|