Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8270875

Deprecate the FilterSpuriousWakeups flag so it can be removed

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b07

      Description

      The FilterSpuriousWakeups flag defaults to true and causes the low-level synchronization routine to ignore a spurious return from pthread_cond_timedwait on Posix systems.

      The flag is only used in conjunction with the following Java-level APIs:

      - Thread.sleep
      - Object.wait(int millis) et al.

      but even if we disabled the flag, in the Thread.sleep case it would make no difference as higher-level code will still act to filter the spurious wakeup and prevent an early return.

      So in summary this flag can be used to change the behaviour of only one of the three core Java blocking primitives (the third being LockSupport.park(long nanos)).

      Given that, and the fact it serves no purpose to disable the flag, then flag can simply be removed. But as this is a product flag we will first deprecate it.

      This cleanup should have been done a long time ago.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: