On 05/14/2008 11:20 AM, Emmanuel Lecharny wrote:
What I can tell at least though is that the session configuration
properties provided by IoService should be volatile, because they are
accessed in a different thread (I/O processor) almost always.
Use synchronization, not volatile. it's too dangerous. When we are sure
that it works fine, we _may_ switch to volatile.
I don't understand this? Volatile isn't dangerous at all. It's clearly
defined and well-specified, and using it to make fields have multi-thread
visibility is a perfectly fine usage for them.
- DML