Alex Miller lives in St. Louis. He writes code for a living and
currently work for Terracotta Tech on the Terracotta open-source
Java clustering product. Prior to Terracotta he worked at BEA
Systems and was Chief Architect at MetaMatrix. His main language
for the last decade has been Java, although Alex have been paid
to program in several languages over the years (C++, Python,
Pascal, etc). Alex has posted 43 posts at DZone. You can read
more from them at their website. View Full User Profile
Documenting Thread Safety    • submit to reddit  Along with the
problem of actually making code thread-safe, there is also the
problem of documenting it so other programmers know how to use
your code. In general, it’s wise when designing a class to
consider the state in the class and determine if each piece
needs to be protected and how.    1. You might decide to make
your class immutable and thus avoid needing synchronization at
all. (An excellent choice.)   2. You may decide that either a
class is intended to be used