Skip to content

Commit 77a5166

Browse files
chore: Simplifies execute to use a standard for loop
1 parent 1d9ecb3 commit 77a5166

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/AsyncDataLoader/DataLoader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public actor DataLoader<Key: Hashable & Sendable, Value: Sendable> {
173173
// If a maxBatchSize was provided and the queue is longer, then segment the
174174
// queue into multiple batches, otherwise treat the queue as a single batch.
175175
if let maxBatchSize = options.maxBatchSize, maxBatchSize > 0, maxBatchSize < batch.count {
176-
try await batch.chunks(ofCount: maxBatchSize).asyncForEach { slicedBatch in
176+
for slicedBatch in batch.chunks(ofCount: maxBatchSize) {
177177
try await self.executeBatch(batch: Array(slicedBatch))
178178
}
179179
} else {

0 commit comments

Comments
 (0)