Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
"ByteBuf copiedBuffer(ByteBuffer buffer)" in Netty 4.0.24 is NOT thread safe #3896
I'm not sure why this static method is not thread safe, but it bothers me a lot during the development. As the following code shows, the method firstly copy the position out and then set it back after copying. If there are two threads doing the same thing, the position may be stained.