Skip to content

[#775] Rework closing logic of Worker/Boss#790

Closed
normanmaurer wants to merge 8 commits into
3from
release_worker_boss
Closed

[#775] Rework closing logic of Worker/Boss#790
normanmaurer wants to merge 8 commits into
3from
release_worker_boss

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Before we just shutdown the Executor's which were used to serve the IO, now we only do so if we created them by our own. This means if you create a *ChannelFactory and pass in your own Executor, you will need to shutdown them by yourself after calling releaseExternalResources() on the ChannelFactory. The same is true when create WorkerPool and BossPool instances.

This commit also fixes the problem that the Worker/Boss Thread will never be released if you use an Executor (no ExecutorService).

Before we just shutdown the Executor's which were used to serve the IO, now we only do so if we created them by our own. This means if you create a *ChannelFactory and pass in your own Executor, you will need to shutdown them by yourself after calling releaseExternalResources() on the ChannelFactory. The same is true when create WorkerPool and BossPool instances.

This commit also fixes the problem that the Worker/Boss Thread will never be released if you use an Executor (no ExecutorService).
@normanmaurer
Copy link
Copy Markdown
Member Author

@trustin please review

Norman Maurer added 2 commits December 4, 2012 21:36
…tor interface

While doing this I also moved the rebuildSelector() method from the Worker interface to the NioSelector interface, as this makes more sense.
All of the NIO Boss and Worker implementations now extend from AbstractNioSelector which will make the maintaince of this code a lot easier.
@normanmaurer
Copy link
Copy Markdown
Member Author

@trustin ok I think I'm done with it now.. :)

@trustin
Copy link
Copy Markdown
Member

trustin commented Dec 5, 2012

LGTM. Ship it!

@normanmaurer
Copy link
Copy Markdown
Member Author

Was merged in

chrisvest pushed a commit to chrisvest/netty that referenced this pull request Apr 24, 2025
netty#790)

…G frame as there might be data that was not read / processed yet.

Motivation:

We need to ensure we don't discard data that is not processed yet when
STOP_SENDING is received. Failing to do so might result in missing data

Modifications:

- Don't directly close the stream if STOP_SENDING is received
- Add unit test

Result:

Correctly read pending data even if STOP_SENDING frame is received
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants