SetFromMap and AsLIFOQueue micro suggestions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SetFromMap and AsLIFOQueue micro suggestions

Jason Mehrens
It seems that the SetFromMap should first perform the identity check on
itself before calling equals on the wrapped keyset.  The behavior would be
more consistent with the other collections.

The SetFromMap and AsLIFOQueue toString method call the toString methods
available from the collections given.  For instance, the key set from the
Hashtable has a thread-safe toString method but if you wrap a Hashtable
using the SetFromMap you might get a ConcurrentModificationException when
invoking toString.  The AsLIFOQueue most likely won't see the
ConcurrentModificationException (thank you weakly consistent) but might
perform fewer acquire/release of locks like in the LinkedBlockingDeque case.

Regards,

Jason Mehrens


_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest