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())
|
.build())
|
||||||
.flatMap(deleteItemRequest -> Mono.fromFuture(() -> dynamoDbAsyncClient.deleteItem(deleteItemRequest)), DYNAMO_DB_MAX_BATCH_SIZE)
|
.flatMap(deleteItemRequest -> Mono.fromFuture(() -> dynamoDbAsyncClient.deleteItem(deleteItemRequest)), DYNAMO_DB_MAX_BATCH_SIZE)
|
||||||
// Idiom: wait for everything to finish, but discard the results
|
.then()
|
||||||
.reduce(0, (a, b) -> 0)
|
|
||||||
.toFuture()
|
.toFuture()
|
||||||
.thenRun(Util.NOOP);
|
.thenRun(Util.NOOP);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue