new java.util.BitSet and Synchronization

Parmelan, Edouard EP510777 at
Wed Oct 21 07:41:13 PDT 1998

Hi Everybody,

thanks a lot, I finally use this method from Mike:
> Use System.identityHashCode() to get the unique hash codes for each
BitSet, then
> lock the BitSet with the lower identity hash value first.  This guarantees
> fixed locking order.

Following the new class with full Synchronisation
and a Test class.

I have also reduce some loops as follow:
  for(i = array.length - 1; i >= 0; i--)
  for(i = array.length; i-- > 0; )

-------------- next part --------------
A non-text attachment was scrubbed...
Name: BitSet.tar.gz
Type: application/octet-stream
Size: 3006 bytes
Desc: not available
Url : 

More information about the kaffe mailing list