Memory visibility in handlers

gjwiley a507 at orthogony.com
Sat Mar 6 10:41:35 EST 2010


Good morning-

I have noticed that in many of Netty's provided handlers, there is
no explicit synchronization of member fields. However, if multi-thread
executors are used to bootstrap a channel, my understanding is that an
arbitrary thread will be used for each run of the pipeline.

So, can I assume that synchronization sufficient for change visibility
occurs within the framework itself? i.e. can I safely assume that
even without explicit synchronization in a handler method, changes I
make to handler instance fields will always be visible on subsequent
runs of the pipeline?

TIA,

  -=greg


-- 
View this message in context: http://n2.nabble.com/Memory-visibility-in-handlers-tp4686637p4686637.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list