Skip to content

DRAFT: Adds serial batch execution option to AsyncDataLoader#31

Open
NeedleInAJayStack wants to merge 1 commit intoGraphQLSwift:mainfrom
NeedleInAJayStack:feat/execution-strategy
Open

DRAFT: Adds serial batch execution option to AsyncDataLoader#31
NeedleInAJayStack wants to merge 1 commit intoGraphQLSwift:mainfrom
NeedleInAJayStack:feat/execution-strategy

Conversation

@NeedleInAJayStack
Copy link
Copy Markdown
Member

Allowing for serial execution allows for better control of "fan out", where single executions with many batches can avoid overloading shared resources with concurrent requests.

@NeedleInAJayStack NeedleInAJayStack self-assigned this Apr 15, 2026
@NeedleInAJayStack NeedleInAJayStack changed the title feat: Adds serial batch execution option to AsyncDataLoader DRAFT: Adds serial batch execution option to AsyncDataLoader Apr 15, 2026
Comment on lines +180 to +181
case .parallel:
try await chunks.asyncForEach { slicedBatch in
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asyncForEach is serial execution, not parallel (concurrentForEach is the parallel function).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant