Add SharedAsyncSleep wrapping Arc<dyn AsyncSleep> (#2742)
## Motivation and Context Add `SharedAsyncSleep` wrapping `Arc<dyn AsyncSleep>` and update call sites of `Arc<dyn AsyncSleep>` to use `SharedAsyncSleep` ## Description Public APIs that take/return a trait object for `AsyncSleep` have been using `Arc<dyn AsyncSleep>` in the codebase. This has a downside of exposing a bare `Arc`, making it difficult to change the APIs in the future without breaking backwards compatibility. This PR adds a newtype wrapper `SharedAsyncSleep` that hides `Arc<dyn AsyncSleep>` to alleviate the said issue (the idiom of having `SharedXXX` has been seen in the codebase, e.g. `SharedTimeSource`, `SharedCredentialsProvider`, and so on). ## Testing - [x] Passed tests in CI ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by:Yuki Saito <awsaito@amazon.com> Co-authored-by:
John DiSanti <jdisanti@amazon.com>
Loading
Please register or sign in to comment