netty/netty — pull request #662 by alex-berger (2012-10-17 10:56:57+00:00)
Title: Fix race in AioEventLoopGroup

The submission of a task after checking isShutdown on the EventLoop might fail as the EventLoop might be shutdown between the call to isShutdown and execute.

Anyhow, the whole thing feels a little bit warm and fuzzy to me. Is it really the right thing to do, to execute channel bound I/O events on the underlying AsynchronousChannelGroup's thread when the
channel's EventLoop is shutdown? The JDK API documentation for AsynchronousChannelGroup#withThreadPool clearly advises against such usage (see )

Should this really happen (Channel is still alive but its EventLoop is shutdown), wouldn't it be better to just close the Channel.