Trustin Lee wrote:
ExecutorFilter ensures that two threads don't handle the same session.
So I think the scenario you gave won't happen.  But, will we still
have a visibility problem with getDecoderLock() method in this case?
I thought both synchronized HashMap (for 1.0) and ConcurrentHashMap
(for 1.1+) takes care of the visibility problem.  WDYT?

Trustin
Hello

I agree with Trustin and I think that we will not have a visiblility problem with DECODER_LOCK attribute, bacause thread local memory will be flushed to main memory at the end of synchronized block around decoder.decode( session, in, decoderOut );

But I don't feel like an expert of java concurrecy. I based only on following article in subject of visibility:
http://www.javaworld.com/jw-02-2001/jw-0209-double.html

Regards, Marcin

Reply via email to