Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7684647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:04:33+00:00 2026-05-31T19:04:33+00:00

What happens to the channels, when the MemoryAwareThreadPoolExecutor’s channel or total threshold is reached?

  • 0

What happens to the channels, when the MemoryAwareThreadPoolExecutor’s channel or total threshold is reached? The MemoryAwareThreadPoolExecutor is set into an ExecutionHandler, that’s on every pipeline before the I/O-Handler.

My current state of information:

I found: channel.setReadable(false) is called. That means all read-operations on all channels are stopped, right? So incoming data will not be delivered to any pipeline, won’t it?
When I got it right you should devide your code at the end of a pipeline into a non-blocking business-handler and a blocking business handler with an execution handler before the blocking one.
Example: -> Decoder, Encode, NonBlockingHandler, ExecutionHandler, I/O-Handler

That’s where I think it would be better to get the messages at least to the last handler before the execution handler. If I am right, then messages that would not need to be processed by the I/O-Handler will not get into NonBlockingHandler until Thread-Pool of the execution handler is below threshold again.

I admit that this will not guarantee the execution of the messages in received order per channel. But let’s just assume that it is not necessary.

Best regards and cheers to Netty!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:04:34+00:00Added an answer on May 31, 2026 at 7:04 pm

    When the channel threshold for a given channel is reached, channel.setReadable(false) will be called thus preventing further reads from that channel. When enough data has been processed channel.setReadable(true) will be called allowing data to be read again. In the meantime any unread data will be stored in the OS network stack buffers or backed up to the sending host.

    When the total threshold is reached the IO thread trying to queue the request is blocked until enough data has been processed. You have to be really careful with this because it can lead to deadlock in the following situation:

    1. Channel (or channels) receives data faster than can be processed
    2. Channel (or channels) queue more than the total threshold limit, blocking the IO thread
    3. The thread pool thread writes some data back to the channel and waits for it to complete.

    The thread pool thread is never released because the IO thread is blocked waiting for it to return and thus cannot process the write request.

    One other thing, unless you are queuing ChannelBuffers in the thread pool you really need to create a custom implementation of ObjectSizeEstimator to ensure the thread pool can manage the thresholds properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What happens if a long running page is closed by the user before he
<catalog><channel><id>4</id> <name>News</name> <shortDescription>News happens!</shortDescription> <subscribe>true</subscribe></channel> <channel><id>10</id> <name>Jokes</name> <shortDescription>funny jokes!</shortDescription> </channel> <channel><id>5</id><name>Markets</name<keyword>cc-markets</keyword> <shortDescription>Track the market's
Im trying to break the input and the processing into two parts so that
I have an application that reuses the same WCF channel over and over again.
It happens like this: http://img815.imageshack.us/img815/2608/senzatitolo1c.png With this HTML: <div style=border:1px solid> <img style=float:left> text
What happens (in terms of CLR) when the code on a classic ASP page
This happens when compiling the following code in Visual Studio 2010. My question is:
What happens when [super loadView] or [super viewDidLoad] is written? I tried to remove
What happens when more than one user inserts data in Database (MySQL, Postgres) at
What happens if I use SHGetFolderPath api call in a 32 bit system with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.