-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Using current_runtime always spawns additional thread. #1736
Comments
Indeed, you are correct, I wrongly made use of |
Unfortunately, that API is a hazard that exists due to backwards compat... it should be improved in 0.2. |
@carllerche any reason to not deprecate it? |
@seanmonstar It is still useful to get a handle to the current reactor and not a lazy handle... but it is by far the minority case. So, the question is how to reduce the hazard while still being able to access the functionality. |
Well, and |
Slap a |
I don't want anymore background ever :) I wonder if getting a handle to the current reactor should be a fn not on
|
But yeah, I'd take a PR for deprecating |
Running the
single_threaded
example spawns additional thread (though it is supposed to show that it does not need more threads):My understanding is that the new thread is created by: https://github.com/hyperium/hyper/blob/master/src/server/tcp.rs#L32 but I may be wrong.
I have tried to go lower level using
hyper::server::conn
but was not able to create a truly single-threaded server. Please advice.The text was updated successfully, but these errors were encountered: