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

Description of sleep(), wait(), join() is misleading.

XMLWordPrintable

    • sparc
    • solaris_2.5



      Name: akC45999 Date: 06/09/97



      The Java Language Specification, chapter 20 The Package java.lang,
      Section 20.20.39 static sleep(), reads:

      If the current thread is interrupted by another thread while it is waiting,
      then the sleep is ended and an InterruptedException is thrown.

      But Sun's implementation of this method, as well as java.lang.Thread.join()
      and java.lang.Object.wait(), throws an InterruptedException
      also when the thread was interrupted BEFORE the call to sleep().
      This behaviour looks reasonable, so subcategory of this bug
      is doc and not api.

      ======================================================================

            gbrachasunw Gilad Bracha (Inactive)
            rfqsunw Rfq Rfq (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: