different thread in netty
See original GitHub issueExpected behavior
oh,at first i am not in English i just want to know why thread not in event loop ,the WriteBufferWaterMark not use! en, yes, in chinese 我就想知道为什么在我自己的线程中,不是netty的线程中,可以绕过WriteBufferWaterMark发送超过指定长度的消息,出于什么原因这样设计
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or URL to code)
`private void write(Object msg, boolean flush, ChannelPromise promise) { AbstractChannelHandlerContext next = findContextOutbound(); final Object m = pipeline.touch(msg, next); EventExecutor executor = next.executor(); if (executor.inEventLoop()) { if (flush) { next.invokeWriteAndFlush(m, promise); } else { next.invokeWrite(m, promise); } } else {
AbstractWriteTask task;
if (flush) {
task = WriteAndFlushTask.newInstance(next, m, promise);
} else {
task = WriteTask.newInstance(next, m, promise);
}
safeExecute(executor, task, promise, m);
~~~~~~~~~~~~~~~~~this~~~~~~~~~~~~~~~~
}
}`
### Netty version
4.1.16.Final
### JVM version (e.g. `java -version`)
8u172
### OS version (e.g. `uname -a`)
linux windows
Issue Analytics
- State:
- Created 5 years ago
- Comments:38 (10 by maintainers)
Top Results From Across the Web
Netty data model, threading, and gotchas | by Ammar Khaku
All events and handlers for a Channel are executed on its single EventLoop. These EventLoop objects can be thought of as I/O threads...
Read more >Thread model - Netty.docs
Thread model · Merge client-side boss, server-side boss, and NioWorker into a universal I/O thread that can perform all I/O operations. By doing...
Read more >Chapter 7. EventLoop and threading model - Netty in Action
Simply stated, a threading model specifies key aspects of thread management in the context of an OS, programming language, framework, or application.
Read more >How Netty uses thread pools? - java - Stack Overflow
There are two types of threads in a NioServerSocketChannelFactory; one is boss thread and the other is worker thread. Boss threads
Read more >Concurrency in Spring WebFlux - Baeldung
Note that, apart from a normal thread for the server, Netty spawns a bunch of worker threads for request processing. These are typically ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@monkey1993 I still not understand what your issue is. Can you maybe just provide a failing unit test ?
Could you please use English in INTERNATIONAL COMMUNITY?