tower-rs / tower

async fn(Request) -> Result<Response, Error>
https://docs.rs/tower
MIT License
3.49k stars 276 forks source link

Add `BoxCloneSyncService` #770

Open tthebst opened 4 months ago

tthebst commented 4 months ago

Currently BoxCloneService does not implement Sync even though the inner Service implements Sync. This can be solved by adding a Sync bound to the inner service bounds.

Other projects such as axum also have this just internally. Might be worth adding it upstream.

I would be willing to submit a PR for this.

tobz commented 2 months ago

@tthebst Yeah, looking at what axum does... it seems like that ought to be fine.

If you're willing to submit a PR, that'd be great.

GlenDC commented 2 months ago

If you no longer can pick this work up @tthebst in the next weeks do let us know. I can take it over if you wish. Otherwise I’ll leave it with pleasure for you to do, given it was your proposal :)