Skip to content

Why is the wakeup flag still checked after NioEventLoop.select is executed? #9782

Closed

Description

@jffree

Netty version

4.1

Description

In NioEventLoop.run function:

                       if (wakenUp.get()) {
                            selector.wakeup();
                        }

Why is the wakeup flag still checked after NioEventLoop.select is executed?In NioEventLoop.select function, already use hasTasks func to check if there are new tasks joined. I don't think this step is necessary.

Activity

  1. normanmaurer commented on Nov 22, 2019

    @normanmaurer
    Member

    @njhill can you have a look as you worked on this stuff ?

  2. franz1981 commented on Nov 22, 2019

    @franz1981
    Contributor

    For different reasons I've come at a similar conclusion some time ago: linking the issue here hoping will help #9112

  3. njhill commented on Nov 23, 2019

    @njhill
    Member

    I actually had not really dug into the NioEventLoop impl too much, prior focus was on streamlining EpollEventLoop. But from what I'd seen it was really in need of an equivalent overhaul.

    The latest structure of EpollEventLoop should actually be mostly applicable to the other async transports including NIO so I took a quick stab at refactoring NioEventLoop along those lines, will open a PR.

  4. njhill commented on Nov 23, 2019

    @njhill
    Member
  5. added this to the 4.1.44.Final milestone on Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions