b413464091
Motivation AbstractChannelHandlerContext uses recyclable tasks when performing writes from outside of the event loop. There's currently two distinct classes WriteTask and WriteAndFlushTask used for executing writes versus writeAndFlushes, and these are recycled in separate pools. However it is straightforward to just have a single class / recycler pool, with a flush flag. Modifications - Unify WriteTasks into a single class using the sign bit of the existing size field to indicate whether a flush should be performed - Use the new executor lazyExecute() method to lazily execute the non-flush write tasks explicitly - Change AbstractChannelHandlerContext#invokeWrite and AbstractChannelHandlerContext#invokeWriteAndFlush from private to package-private to avoid synthetic methods - Correct the default object size estimate for WriteTask Results - Possibly improved reuse of recycled write tasks - Fewer virtual method calls and shorter path lengths - Less code |
||
---|---|---|
.. | ||
src | ||
pom.xml |