Quantcast
Viewing all articles
Browse latest Browse all 13

Why not lock on a value-based class

The docs say that you shouldn’t lock on an instance of a value-based Java class such as Optional because code may produce unpredictable results if it attempts to distinguish two references to equal values of a value-based class … indirectly via an appeal to synchronization… Why should Java's value-based classes not be serialized? asserts Because […]

The post Why not lock on a value-based class appeared first on BlogoSfera.


Viewing all articles
Browse latest Browse all 13

Trending Articles