a6abff75a6
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. |
||
---|---|---|
.. | ||
main | ||
test/java/io/netty/channel/epoll |