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

(spec thread) Fix Thread.yield() javadoc

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b19
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        The current spec for Thread.yield

        "Causes the currently executing thread object to temporarily pause and allow other threads to execute."

        is inadequate because
        - there is no guarantee that the thread will or will not pause.
        - if there are idle processors it is unlikely to pause.
        - it should be clearer that this is a hint to the implementation, almost a "no-op".
        - it should be made clear that ordinary application developers should not use this
          method. It is only appropriate in unusual circumstances. That is, it should be
          denigrated.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  chegar Chris Hegarty
                  Reporter:
                  martin Martin Buchholz
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: