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

Does the HTTP Server Spawn Threads? #423

Closed
fredfortier opened this issue Apr 26, 2019 · 1 comment
Closed

Does the HTTP Server Spawn Threads? #423

fredfortier opened this issue Apr 26, 2019 · 1 comment

Comments

@fredfortier
Copy link

fredfortier commented Apr 26, 2019

I'm running the HTTP Server in a manner basically identical to the http_async.rs example. When two calls are received at the exact same, it seems like the server spawns a new thread. Is this true or are the requests always queued in the Tokio event loop?

@fredfortier fredfortier changed the title Does the HTTP Server Spawn New Thread? Does the HTTP Server Spawn Threads? Apr 26, 2019
@tomusdrw
Copy link
Contributor

No, the ServerBuilder only starts one thread for the Tokio-core event loop (unless configured different via .threads(n)) all incoming requests are queued and executed on that one thread.
Please re-open in case you have further questions or believe the server does not work as expected.

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

No branches or pull requests

2 participants