On Thursday, January 29, 2004, at 11:55 , Melvin Smith wrote:

At 11:45 PM 1/28/2004 -0500, Gordon Henriksen wrote:

On Wednesday, January 28, 2004, at 12:53 , Melvin Smith wrote:

At 12:27 PM 1/23/2004 -0800, Damien Neil wrote:

Java Collections are a standard Java library of common data structures such as arrays and hashes. Collections are not synchronized; access involves no locks at all. Multiple threads accessing the same collection at the same time cannot, however, result in the virtual machine crashing. (They can result in data structure corruption, but this corruption is limited to "surprising results" rather than "VM crash".)

But this accomplishes nothing useful and still means the data structure is not re-entrant, nor is it corruption "resistant", regardless of how we judge it.

It does accomplish something very useful indeed: It avoids the overhead of automatic locking when it isn't necessary. When *is* that locking necessary? To a second order approximation, ***NEVER.***

Pardon me but I've apparently lost track of context here.


I thought we were discussing correct behavior of a shared data structure, not general cases. Or maybe this is the general case and I should go read more backlog? :)

A "shared" data structure, as per Dan's document? It's a somewhat novel approach, trying to avoid locking overhead with dynamic dispatch and vtable swizzling. I'm discussing somewhat more traditional technologies, which simply allow an object to perform equally correctly and with no differentiation between shared and unshared cases. In essence, I'm arguing that a "shared" case isn't necessary for some data structures in the first place.




Gordon Henriksen
[EMAIL PROTECTED]

Reply via email to