Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6351533
Votes 0
Synopsis CyclicBarrier reset() should return the number of awaiters
Category java:classes_util_concurrent
Reported Against
Release Fixed
State 3-Accepted, request for enhancement
Priority: 4-Low
Related Bugs
Submit Date 16-NOV-2005
Description
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.
Posted Date : 2005-11-16 23:45:06.0
Work Around
N/A
Evaluation
The proposed suggestion is an incompatible change, 
so it cannnot be implemented exactly as suggested.
I wonder if there's some other way to implement the
desired function with the current API.
Maybe an AtomicInteger incremented by each thread that
receives a BrokenBarrier?  I suspect that the desired
communication can be implemented by using some other
j.u.c. mechanism.
Posted Date : 2005-11-17 00:16:11.0
Comments
  
  Include a link with my name & email   

Submitted On 17-NOV-2005
daveyost
I reported this.



PLEASE NOTE: JDK6 is formerly known as Project Mustang