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

JLSv3 section 17.9 "Sleep and Yield" needs statement about observable effects removed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7
    • 6
    • specification
    • None
    • rc
    • generic
    • generic
    • Verified

      Section 17.9 "Sleep and Yield" in the Java Language Specification Third Edition, has the following statement:

        "Neither a sleep for a period of zero time nor a yield operation need have observable effects."

      This precludes java.lang.Thread.yield from having any strong specification as it could be challenged as a contradiction to this statement. Effectively this statement in the JLS allows yield to be a noop and prevents it from gaining any strongly specified behavior.

      see comments section.

            abuckley Alex Buckley
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: