axum
axum copied to clipboard
Enforce Sync for inner services and handlers
Motivation: Makes Router and RouterService Sync.
The box_clone_sync_service is copied from tower and adjusted to include Sync, none of the docs since it is private. It could probably be upstreamed into tower if we decide that we want this.
I'm a little afraid of this since we used to require Sync in the past but reverted it because it broke other stuff (https://github.com/tokio-rs/axum/pull/273). At least requires a bunch of testing with real projects that uses axum to see the impact.
Yeah I agree this needs extra testing. After the coming rc.3, I can port a few things to that first, to then see whether this commit works equally well.
I'll also test it with our stuff at Embark.
Putting this on the 0.7 milestone. I'm reluctant to increase the scope of 0.6 now.
Rebased. Hope you find some time to test it, I'm probably not available for that at least for a few weeks.
I've added this to the todo list for 0.7 but probably easier to redo it there rather than trying to rebase it given all the changes. I'll close this for now but still think it's something we should consider for 0.7.