netty5/transport-native-epoll/src
Nick Hill a6abff75a6 Epoll: Don't wake event loop when splicing (#9354)
Motivation

I noticed this while looking at something else.
AbstractEpollStreamChannel::spliceQueue is an MPSC queue but only
accessed from the event loop. So it could be just changed to e.g. an
ArrayDeque. This PR instead reverts to using is as an MPSC queue to
avoid dispatching a task to the EL, as appears was the original
intention.

Modification

Change AbstractEpollStreamChannel::spliceQueue to be volatile and lazily
initialized via double-checked locking. Add tasks directly to the queue
from the public methods rather than possibly waking the EL just to
enqueue.

An alternative is just to change PlatformDependent.newMpscQueue() to new
ArrayDeque() and be done with it :)

Result

Less disruptive channel/fd-splicing.
2019-07-12 18:14:06 +02:00
..
main Epoll: Don't wake event loop when splicing (#9354) 2019-07-12 18:14:06 +02:00
test/java/io/netty/channel/epoll Added UDP multicast (with caveats: getInterface, getNetworkInterface, block or loopback-mode-disabled operations). 2019-05-25 10:06:13 +02:00