This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
This file contains 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
niklasad1
added
A0-pleasereview 🤓
Pull request needs code review.
A3-inprogress ⏳
Pull request is in progress. No review needed at this stage.
M4-core ⛓
Core client code / Rust.
labels
Apr 11, 2018
debris
approved these changes
Apr 11, 2018
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.
you are definitely on the right track! imo we could merge it as it is. @tomusdrw can you confirm?
debris
added
A8-looksgood 🦄
Pull request is reviewed well.
and removed
A0-pleasereview 🤓
Pull request needs code review.
labels
Apr 11, 2018
tomusdrw
approved these changes
Apr 11, 2018
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.
Looks good!
|
||
fn fetch(&self, request: Request, abort: fetch::Abort) -> Self::Result { | ||
let u = request.url().clone(); | ||
let (tx, rx) = futures::oneshot(); | ||
thread::spawn(move || { | ||
future::ok(if self.val.is_some() { |
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 think thread was introduced here to simulate some asynchronicity (I remember fixing an issue related to this). But I think it's fine as is anyway.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A3-inprogress ⏳
Pull request is in progress. No review needed at this stage.
A8-looksgood 🦄
Pull request is reviewed well.
M4-core ⛓
Core client code / Rust.
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.
Attempt to close #8240
But I haven't fixed yet
dapps/FakeFetch
because it has more functionality but I want to know whether this is on the right track or not before spending more time on it!Also, the tests in
price_info
need to be re-factored because they might pass even if the closures are not ever executed, https://github.com/paritytech/parity/blob/master/price-info/src/lib.rs#L216-#L255/cc @debris