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

CyclicBarrier reset() should return the number of awaiters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 5.0
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      Return value is the number of awaiters to get BrokenBarrierException; in other words result > 0 means the reset() had an effect on some other threads.

      JUSTIFICATION :
      There is no way atomically to know whether the reset affected any other threads.


      ---------- BEGIN SOURCE ----------
      I have some code that needs this feature, but it is too complex to include here.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      The only thing I can see is to copy the source code and modify it to include the feature I want, which is not an acceptable workaround.

            dl Doug Lea
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: