netty5/transport-native-kqueue/src/main/java/io/netty/channel/kqueue
Scott Mitchell ed0668384b NIO read spin event loop spin when half closed (#7801)
Motivation:
AbstractNioByteChannel will detect that the remote end of the socket has
been closed and propagate a user event through the pipeline. However if
the user has auto read on, or calls read again, we may propagate the
same user events again. If the underlying transport continuously
notifies us that there is read activity this will happen in a spin loop
which consumes unnecessary CPU.

Modifications:
- AbstractNioByteChannel's unsafe read() should check if the input side
of the socket has been shutdown before processing the event. This is
consistent with EPOLL and KQUEUE transports.
- add unit test with @normanmaurer's help, and make transports consistent with respect to user events

Result:
No more read spin loop in NIO when the channel is half closed.
2018-03-28 20:02:57 +02:00
..
AbstractKQueueChannel.java NIO read spin event loop spin when half closed (#7801) 2018-03-28 20:02:57 +02:00
AbstractKQueueServerChannel.java Fix assertion error when closing / shutdown native channel and SO_LINGER is set. 2017-09-18 14:46:37 -07:00
AbstractKQueueStreamChannel.java Flush task should not flush messages that were written since last flush attempt. 2018-03-02 10:09:40 +09:00
AcceptFilter.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
BsdSocket.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
KQueue.java Include more detail why Unsafe is not available 2017-08-29 22:02:06 +02:00
KQueueChannelConfig.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
KQueueChannelOption.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueDatagramChannel.java Fix assertion error when closing / shutdown native channel and SO_LINGER is set. 2017-09-18 14:46:37 -07:00
KQueueDatagramChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueDomainSocketChannel.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
KQueueDomainSocketChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueEventArray.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueEventLoop.java Unify KQueue and Epoll wait timeout approach 2017-08-18 13:09:02 -07:00
KQueueEventLoopGroup.java Unify {Epoll,KQueue}EventLoopGroup initialization. 2017-07-24 20:14:54 +02:00
KQueueRecvByteAllocatorHandle.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueServerChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueServerDomainSocketChannel.java Add support to wrap an existing filedescriptor when using native kqueue transport 2017-05-19 19:34:47 +02:00
KQueueServerSocketChannel.java Correctly handle connect/disconnect in EpollDatagramChannel / KQueueDatagramChannel 2017-08-04 09:22:53 +02:00
KQueueServerSocketChannelConfig.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
KQueueSocketChannel.java Correctly handle connect/disconnect in EpollDatagramChannel / KQueueDatagramChannel 2017-08-04 09:22:53 +02:00
KQueueSocketChannelConfig.java Enforce writeSpinCount to limit resource consumption per socket (#7478) 2017-12-07 16:00:52 -08:00
KQueueStaticallyReferencedJniMethods.java KQueue detect peer close without EVFILT_READ 2017-08-18 11:00:18 -07:00
Native.java Not call java methods from within JNI init code to prevent class loading deadlocks. 2017-12-06 14:34:15 +01:00
NativeLongArray.java New native transport for kqueue 2017-05-03 09:53:22 -07:00
package-info.java New native transport for kqueue 2017-05-03 09:53:22 -07:00