-
- Downloads
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>
Showing
- CHANGELOG.next.toml 12 additions, 0 deletionsCHANGELOG.next.toml
- aws/rust-runtime/aws-config/src/connector.rs 2 additions, 2 deletionsaws/rust-runtime/aws-config/src/connector.rs
- aws/rust-runtime/aws-config/src/imds/client/token.rs 2 additions, 2 deletionsaws/rust-runtime/aws-config/src/imds/client/token.rs
- aws/rust-runtime/aws-config/src/lib.rs 3 additions, 3 deletionsaws/rust-runtime/aws-config/src/lib.rs
- aws/rust-runtime/aws-config/src/provider_config.rs 6 additions, 7 deletionsaws/rust-runtime/aws-config/src/provider_config.rs
- aws/rust-runtime/aws-credential-types/external-types.toml 1 addition, 1 deletionaws/rust-runtime/aws-credential-types/external-types.toml
- aws/rust-runtime/aws-credential-types/src/cache/lazy_caching.rs 13 additions, 15 deletions...st-runtime/aws-credential-types/src/cache/lazy_caching.rs
- aws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs 14 additions, 14 deletionsaws/rust-runtime/aws-inlineable/src/endpoint_discovery.rs
- aws/rust-runtime/aws-types/external-types.toml 1 addition, 1 deletionaws/rust-runtime/aws-types/external-types.toml
- aws/rust-runtime/aws-types/src/sdk_config.rs 14 additions, 17 deletionsaws/rust-runtime/aws-types/src/sdk_config.rs
- aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/CredentialProviders.kt 1 addition, 1 deletion...lin/software/amazon/smithy/rustsdk/CredentialProviders.kt
- aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt 1 addition, 1 deletion...tlin/software/amazon/smithy/rustsdk/SdkConfigDecorator.kt
- aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/timestream/TimestreamDecorator.kt 1 addition, 1 deletion...mithy/rustsdk/customize/timestream/TimestreamDecorator.kt
- aws/sdk/integration-tests/dynamodb/tests/timeouts.rs 3 additions, 4 deletionsaws/sdk/integration-tests/dynamodb/tests/timeouts.rs
- aws/sdk/integration-tests/no-default-features/tests/client-construction.rs 3 additions, 1 deletion...on-tests/no-default-features/tests/client-construction.rs
- aws/sdk/integration-tests/s3/tests/alternative-async-runtime.rs 11 additions, 10 deletions...k/integration-tests/s3/tests/alternative-async-runtime.rs
- aws/sdk/integration-tests/s3/tests/make-connector-override.rs 3 additions, 3 deletions...sdk/integration-tests/s3/tests/make-connector-override.rs
- aws/sdk/integration-tests/s3/tests/reconnects.rs 3 additions, 4 deletionsaws/sdk/integration-tests/s3/tests/reconnects.rs
- aws/sdk/integration-tests/s3/tests/sleep_impl_use_cases.rs 8 additions, 4 deletionsaws/sdk/integration-tests/s3/tests/sleep_impl_use_cases.rs
- aws/sdk/integration-tests/s3/tests/timeouts.rs 2 additions, 3 deletionsaws/sdk/integration-tests/s3/tests/timeouts.rs
Loading
Please register or sign in to comment