wsky / top-link

embedded duplex multi-channel endpoint and connection management for c#/java/...
6 stars 1 forks source link

init more than one NettyServerChannel got high cpu load #81

Closed wsky closed 11 years ago

wsky commented 11 years ago

same as #79

int prev = Thread.getAllStackTraces().keySet().size();
        System.out.println(prev);
        for (int i = 0; i < 10; i++) {
            new NettyServerChannel(DefaultLoggerFactory.getDefault(), 8000 + i) {
                @Override
                protected void preparePipeline(ChannelPipeline pipeline) {
                    pipeline.addLast("handler", new SimpleChannelUpstreamHandler());
                }
            }.run();
        }
        System.out.println(Thread.getAllStackTraces().keySet().size());

load will up to 8