Skip to content

Allow chaining together multiple dataloader calls #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2022

Conversation

jkimbo
Copy link
Owner

@jkimbo jkimbo commented Oct 4, 2022

This PR changes how the dataloader batching functionality works. Rather
than trying to "detect" if a future has a "deferred_callback" in the
execution context, we create a singleton DataLoaderBatchCallbacks
which all dataloaders add their dispatch_queue functions to when
needed. We can then run all the callbacks in the execution context to
complete the SyncFuture's. This allows us to chain dataloaders together.

Fixes #6

Diff-Id: daffd

This PR changes how the dataloader batching functionality works. Rather
than trying to "detect" if a future has a "deferred_callback" in the
execution context, we create a singleton `DataLoaderBatchCallbacks`
which all dataloaders add their `dispatch_queue` functions to when
needed. We can then run all the callbacks in the execution context to
complete the SyncFuture's. This allows us to chain dataloaders together.

Fixes #6

Diff-Id: daffd
@jkimbo jkimbo merged commit 22fa27b into main Oct 4, 2022
@jkimbo jkimbo deleted the allow-chaining-together-multiple-dataloader-calls branch October 4, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chain dataloaders
1 participant