Remove all Pusher/Puller boxing using GATs#460
Open
petrosagg wants to merge 4 commits intoTimelyDataflow:masterfrom
Open
Remove all Pusher/Puller boxing using GATs#460petrosagg wants to merge 4 commits intoTimelyDataflow:masterfrom
petrosagg wants to merge 4 commits intoTimelyDataflow:masterfrom
Conversation
timely/src/dataflow/channels/pact.rs
Outdated
|
|
||
| /// A `ParallelizationContractCore` allocates paired `Push` and `Pull` implementors. | ||
| pub trait ParallelizationContractCore<T, D> { | ||
| pub trait ParallelizationContractCore<G: ScopeParent, D> { |
Member
There was a problem hiding this comment.
This looks like a regression. Can we leave it as T?
Contributor
Author
There was a problem hiding this comment.
Yes, just fixed that
petrosagg
commented
Mar 18, 2022
| to_push: None, | ||
| pushers, | ||
| puller, | ||
| pushers: pushers.into_iter().map(|p| Box::new(p) as Box<dyn Push<_>>).collect(), |
Contributor
Author
There was a problem hiding this comment.
@frankmcsherry This is the only place I kept the trait objects because otherwise Progcaster would have to become generic over the pusher which would then add a generic parameter to Subgraph. I didn't know if that was ok but if it is I can eliminate this last bit of trait object if that sounds good
antiguru
reviewed
Mar 18, 2022
e602f8e to
2046265
Compare
Contributor
Author
|
This PR now compiles on stable! |
antiguru
approved these changes
Mar 5, 2023
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the
Allocate::allocatemethod is hardcoded to return a(Vec<Box<dyn Push<Message<T>>>>, Box<dyn Pull<Message<T>>>)pair. Boxing was necessary because the genericTparameter was on the method.Generic associated types is the missing piece to allow the concrete type to be spelled out and since they are right around the corner for stable Rust I went ahead and implemented it.
This PR removes every single use of a
Box<dyn Puller/Pusher>instance in the codebase. It is not mergeable yet because it requires the nightly feature flag but we could discuss it and merge it once GATs are released.