This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
Releases: bradynpoulsen/aws-sdk-kotlin-coroutines
Releases · bradynpoulsen/aws-sdk-kotlin-coroutines
0.2.0
- Renamed
awsCoroutine
andawsBlockingCoroutine
tosuspendCommandAsync
andsuspendCommand
respectively. Since the AWS SDK uses executor threads to perform blocking IO on, the the async variant is not any less "blocking" than its counterpart. To have control over which thread the blocking IO occurs on, usesuspendCommand
with a CoroutineDispatcher that's backed by a thread pool. suspendCommand
is an extension ofCoroutineScope
to inherit the scope'sDispatcher
. This is different compared tosuspendCommandAsync
which immediately hands-off to the AWS SDK executor service for dispatching the command and does not benefit from aCoroutineScope
.
The two approaches for executing SDK commands with coroutines now are:
CoroutineScope.suspendCommand(client::command[, coroutineContext][, requestBuilder]): result
suspendCommandAsync(client::commandAsync[, requestBuilder]): result
0.1.0
Initial release of coroutine builder APIs for AWS SDK commands:
awsCoroutine(asyncCommand[, requestBuilder])
: Executes an asynchronous SDK commandawsBlockingCoroutine(blockingCommand[, coroutineContext][, requestBuilder])
: Executes a blocking SDK command on a separate dispatcher
All APIs have been annotated with @ExperimentalAwsCoroutineApi
while commands are in pre-release.
You must opt-in to these experimental APIs using one of:
@UseExperimental(ExperimentalAwsCoroutineApi::class)
annotation- Compiler arg:
-Xuse-experimental=com.github.bradynpoulsen.aws.coroutines.ExperimentalAwsCoroutineApi