De-idiom-ize a "wait for everything to finish" idiom
This commit is contained in:
parent
c4cbf0d618
commit
f59c34004d
|
@ -309,8 +309,7 @@ public abstract class SingleUsePreKeyStore<K extends PreKey<?>> {
|
|||
))
|
||||
.build())
|
||||
.flatMap(deleteItemRequest -> Mono.fromFuture(() -> dynamoDbAsyncClient.deleteItem(deleteItemRequest)), DYNAMO_DB_MAX_BATCH_SIZE)
|
||||
// Idiom: wait for everything to finish, but discard the results
|
||||
.reduce(0, (a, b) -> 0)
|
||||
.then()
|
||||
.toFuture()
|
||||
.thenRun(Util.NOOP);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue