question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

different thread in netty

See original GitHub issue

Expected 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:closed
  • Created 5 years ago
  • Comments:38 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
normanmaurercommented, Jul 25, 2018

@monkey1993 I still not understand what your issue is. Can you maybe just provide a failing unit test ?

0reactions
liewmanchoicommented, Jun 6, 2019

@teddie-lee 其实我比较好奇的是,如果检测到了,但是netty依然将它发送到了客户端,不是应该程序手动处理吗?就像他们给的实例代码。

Could you please use English in INTERNATIONAL COMMUNITY?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found