Bryan Pendleton wrote:
what does it mean by MT and thread aware in the context of java
source files..!!
This is a pretty complicated subject. Here's a good place to start:
http://www.awprofessional.com/bookstore/product.asp?isbn=0201310090&rl=1
I recently read through another book on concurrency, where two
annotations were used to document thread-safety and synchronization
policies. Although we can't use annotations for quite a while yet, we
could use them as comments;
Class annotations: @Immutable, @TheadSafe, (@NotThreadSafe)
Field and methods: @GuardedBy("lock object")
These are minimalistic and should be very simple to use.
I find the GuardedBy-annotation very handy, because it tells me what the
developer who wrote the code intended and I can easily follow in the
same trail (for instance when adding another method accessing a
guarded/shared field).
Of course, there might be other approaches to document this as well :)
--
Kristian
thanks,
bryan