Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@bradynpoulsen bradynpoulsen released this 21 Dec 01:29
8c3022c
  • Renamed awsCoroutine and awsBlockingCoroutine to suspendCommandAsync and suspendCommand 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, use suspendCommand with a CoroutineDispatcher that's backed by a thread pool.
  • suspendCommand is an extension of CoroutineScope to inherit the scope's Dispatcher. This is different compared to suspendCommandAsync which immediately hands-off to the AWS SDK executor service for dispatching the command and does not benefit from a CoroutineScope.

The two approaches for executing SDK commands with coroutines now are:

  • CoroutineScope.suspendCommand(client::command[, coroutineContext][, requestBuilder]): result
  • suspendCommandAsync(client::commandAsync[, requestBuilder]): result