[concurrency-interest] Synchronization of data read by
dawidk at mathcs.emory.edu
Tue Oct 25 12:25:07 EDT 2005
Ryan LeCompte wrote:
>Page 190 of Effective Java:
>"Unless you are running on a multiprocessor, you are unlikely to observe the
>problematic behavior in practice, but there are no guarantees."
"Unlikely" <> "Never" :)
Not using synchronization properly is like driving in the night without
lights - maybe, if the traffic is low, nothing bad will happen, but why
on Earth would you do that? :)
Also, if you drive like this often and in high traffic, it's pretty sure
that eventually a bad thing will happen. Similarly with lack of
synchronization - it will hit you or somebody sooner or later, and it be
usually in the worst possible moment. And you really gain nothing by not
using synchronization properly.
This is not some artificial academic problem; this is a debugging
nightmare to be taken seriously.
More information about the Concurrency-interest