demultiplexing protobuf messages
Trustin Lee (이희승)
trustin at gmail.com
Sat Nov 7 10:02:25 EST 2009
You are right. However, if the decoder is placed after
ExecutionHandler, decoder might be called from different threads while
it's not called simultaneously, as described in
OrderedMemoryAwareThreadPoolExecutor Javadoc. If your decoder is
placed before ExecutionHandler or you don't use ExecutionHandler at
all, it's safe to define the member variables as non-volatile.
HTH
— Trustin Lee, http://gleamynode.net/
On Wed, Nov 4, 2009 at 11:41 PM, sandstorm_sh <sandstorm_sh at abv.bg> wrote:
>
> Thanks to both of you.
>
> Why are those fields volatile ?
>
> Isnt there a handler/decoder instance per pipeline/connection ?
> --
> View this message in context: http://n2.nabble.com/demultiplexing-protobuf-messages-tp3931395p3945572.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list