-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add parallel pull mode #256
Changes from 26 commits
71ff23d
bad4749
69b1b52
806a9f1
56e3f7a
474c263
b5d5610
2ed4aeb
0aa3a78
4622234
06902f8
a5758a6
f85ca20
7c655da
6572462
fe31d87
be3b6a9
419b36c
3d39438
69bdf25
8149b55
2e972d9
3340f3e
8722dd1
2129174
e8ad1e2
b905d73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
type-complexity-threshold = 450 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. error: very complex type used. Consider factoring parts into `type` definitions
--> src/sync.rs:93:47
|
93 | let (pull_finished_tx, pull_finished_rx): (Sender<Result<PullOk, PullErr>>, Receiver<Result<PullOk, PullErr>>) = unbounded();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::type-complexity` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
error: very complex type used. Consider factoring parts into `type` definitions
--> src/sync.rs:110:47
|
110 | let (pull_finished_tx, pull_finished_rx): (Sender<Result<PullOk, PullErr>>, Receiver<Result<PullOk, PullErr>>) = unbounded();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
error: aborting due to 2 previous errors 😭 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
#[derive(Debug, PartialEq)] | ||
use sync::PullMode; | ||
|
||
#[derive(Debug, PartialEq, Clone)] | ||
pub struct Config { | ||
pub remote: Remote, | ||
pub push: Push, | ||
pub pull: Pull, | ||
} | ||
|
||
#[derive(Debug, PartialEq)] | ||
#[derive(Debug, PartialEq, Clone)] | ||
pub struct Remote { | ||
pub host: String, | ||
} | ||
|
||
#[derive(Debug, PartialEq)] | ||
#[derive(Debug, PartialEq, Clone)] | ||
pub struct Push { | ||
pub compression: u8, | ||
} | ||
|
||
#[derive(Debug, PartialEq)] | ||
#[derive(Debug, PartialEq, Clone)] | ||
pub struct Pull { | ||
pub compression: u8, | ||
pub mode: PullMode, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't used it in a while, but any reason not to use
std::sync::mpsc
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially I swapped to
crossbeam
because I needed multi-receiver support, but then even that wasn't enough so I've also addedbus
Decided to keep crossbeam for performance lol (nanoseconds matter hey!), we'll be stripping final binary #242 so it shouldn't matter which one we're using from the binary size point