Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unblock method for graceful shutdown #184

Merged
merged 1 commit into from Oct 25, 2020

Conversation

rawler
Copy link
Collaborator

@rawler rawler commented Sep 22, 2020

No description provided.

@rawler
Copy link
Collaborator Author

rawler commented Sep 22, 2020

Replaces #156

@rawler
Copy link
Collaborator Author

rawler commented Sep 22, 2020

This change was already accepted in #156. I'll give it a few days, and then merge unless there are objections.

@tamird
Copy link

tamird commented Oct 13, 2020

This unblocks the server, but doesn't prevent the thread pool from leaking. In other words, it doesn't solve what tomaka/rouille#219 attempts to solve.

@rawler
Copy link
Collaborator Author

rawler commented Oct 21, 2020

@tamird From what I can tell, these two PR:s are distinct, but possibly complementary.

This PR, or an PR in tiny-http naturally, cannot wait for threads used to handle requests, since those threads are completely outside it's control?

However, this PR could provide for a simple replacement of the functionality seen in https://github.com/tomaka/rouille/blob/a72ebf1250049cf9ac46919ef16984b056263d03/src/lib.rs#L438 and would fit in between 2 and 3 in the graceful shutdown procedure outlined in https://github.com/tomaka/rouille/pull/219/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759L438. (Stop receiver and make sure new clients can't be queued)

@rawler rawler merged commit 36af7c5 into tiny-http:master Oct 25, 2020
1 check passed
@rawler rawler deleted the unblock-shutdown branch Oct 25, 2020
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.

None yet

3 participants