Skip to content

narrower bootstrap ELG requirements #674

@tanner0101

Description

@tanner0101

NIO's bootstrap helpers like ClientBootstrap and ServerBootstrap currently accept any generic EventLoopGroup. However, the event loops created by this group are eventually force casted to a SelectableEventLoop. This effectively limits one to using MultiThreadedEventLoop or EmbeddedEventLoop.

I suggest narrowing the event loop groups accepted by these bootstraps to something like a SelectableEventLoopGroup protocol. That would help move some obvious programming errors, like passing a NIOTS* event loop group to a standard NIO bootstrap, from runtime to compile time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions