-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(server): allow creating Server with shared Handle #1348
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
Conversation
Awesome! I haven't had a moment to look this over, I hope to find time tomorrow. |
Curious, when you paste the results from the multi-server example, is that running two instances of |
Yea, so either we'd need to:
Or perhaps |
previous
If just run 1 test on 1 port, the result could be
similar with the
I will try to implement this proposal later. |
I'm keen to understand why we need a shutdown signal in the first place, thus requiring the For convenience, you could always construct some sort of What am I missing? |
@srijs that's a great suggestion, thanks! Indeed, the shutdown signal and timeout don't necessarily need to live in the base future. With a |
So, a question that has come up in #1342 is if |
@seanmonstar Should we decouple the reactor from |
I've been working with a start from this PR, and here's what I've got so far:
There's still the question of handling a shutdown signal on the |
I've been stumped the past couple days because tokio will very soon have the concept of a default handle, as well I could just push what exists now, without the (PS, I've just been amending your commit, so it still has your name on it. Hope that's OK...) |
More details about the
impl Future for Server
should be discussed, the mechanismshutdown_signal
like whatrun_until
do may require external fields instruct Server
to impl in Server's Future.simple performance bench:
example/server
:example/multi_server
, run two wrk test in the same time: