Need of synchronization ?

"이희승 (Trustin Lee)" trustin at gmail.com
Wed Aug 25 22:17:50 EDT 2010


Hi Dirk,

No, you don't need to synchronize.  Especially, Netty has an internal
queue for write requests so write()s are always thread safe.
messageReceived() is also thread-safe unless you forward the event to
other threads.

On 08/25/2010 11:20 PM, Mahatma wrote:
> 
> Hi Folks,
> just a short question: do I need to synchronize reading or writing with
> Netty ?
> 
> I'm currently benchmarking my middleware and once in a while messages
> overlap (i.e. received XML is not wellformed anymore). Sending is handled by
> multiple threads, all using the same channel (calls to 'write' are
> synchronized on my side), and receiving is handled by only one thread.
> 
> Thanks a lot,
> Dirk

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100826/793b8b8e/attachment.bin 


More information about the netty-users mailing list