Summary
Deprecate the FilterSpuriousWakeups
flag in JDK 18 so it can be obsoleted in JDK 19 and finally removed in JDK 20.
Problem
The FilterSpuriousWakeups
flag is an archaic flag that can be used to adjust the behaviour of only one of the three core Java blocking API's - Object.wait(timeout)
- on Posix systems only. The other API's (Thread.sleep
and LockSupport.park(nanos)
, and on non-Posix systems, will always filter OS-level spurious wakeups. As filtering OS-level spurious wakeups is a desirable characteristic there is never any reason to not filter them - and we have no knowledge of when such spurious wakeups may even be possible at the OS level.
Solution
Deprecate the FilterSpuriousWakeups
flag in JDK 18, obsolete it in JDK 19, and remove it in JDK 20.
Specification
Update the flag description to show it is deprecated:
> product(bool, FilterSpuriousWakeups, true, \
> "(Deprecated) When true prevents OS-level spurious, or premature,"\
> " wakeups from Object.wait (Ignored for Windows)") \
Add the flag to the deprecated flag table to deprecate in 18, obsolete in 19 and remove in 20:
+ { "FilterSpuriousWakeups", JDK_Version::jdk(18), JDK_Version::jdk(19), JDK_Version::jdk(20) },
- csr of
-
JDK-8270875 Deprecate the FilterSpuriousWakeups flag so it can be removed
-
- Resolved
-