Is Netty Channel.write thread safe?

channel, java, netty, thread-safety

Solution

As you can see from the code, the `ChannelOutboundBuffer.addMessage()` method itself is not thread safe. However, Writing channel is "thread safe" because netty executes the write task/method in the single I/O thread.

Problem

I have a Netty app, where I want to have more than one threads to be writing to a channel. I was just wondering whether Channel.write is thread safe?

Original source