-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Should we require Sync
for services?
#1950
Comments
Hey - just wanted to check in: Is this still relevant? Do we only need |
It’s still needed. Router is not Sync because it contains services that aren’t Sync. That limits our options to use things like Arc internally. So it’s not related to work stealing. |
Considering that once things are setup, we only use the router for reading (routing), what's wrong with using Arc internally? Sure, it incurs a cost of setting things up, but an initial cost shouldn't be a big deal when compared to the fact that once things are setup, when the server is running, we don't lose out on performance. I went through the linked issue and I can't help but feel like requiring |
Not using Arc makes the router more expensive to Clone. It’s is cloned once per new connection. |
Been mulling over this for a few days, and had an idea. How about we wrap everything in an Sorry if these suggestions seems stupid, but I'm not the most well-versed with axum internals. I'm just randomly throwing ideas in hopes of seeing if something sticks |
That won't work. For |
See #1477 for more context.
The text was updated successfully, but these errors were encountered: