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 Server.poll_timeout method #203

Merged
merged 1 commit into from
Jun 8, 2019
Merged

Add Server.poll_timeout method #203

merged 1 commit into from
Jun 8, 2019

Conversation

dbr
Copy link
Contributor

@dbr dbr commented Jan 26, 2019

As per #200 I was looking for a way to have Rouille run in a thread, in a way which I could interrupt when the application shutdown.

Just calling poll in a loop seemed very wasteful. For my purposes just calling poll with a short (~10ms or so) sleep was okay, but seemed like it'd be easy/useful to add a poll_timeout method consistent with tiny_http's recv_timeout

@rushsteve1 rushsteve1 mentioned this pull request Mar 12, 2019
@adnanademovic
Copy link

I've had the same need for a server, and was about to make the same PR. It seems like the simplest and cleanest solution to being able to shut down the server from the same thread.
For the moment, I did the same delay-based solution, but it's a needless waste, as the main reason for using rouille is the fact that it's so snappy and lightweight!!

@tomaka tomaka merged commit 41128ed into tomaka:master Jun 8, 2019
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.

3 participants