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
Migrate threadpool to std::future #46
Conversation
a242109
to
4300996
Compare
4300996
to
6f2e3d1
Compare
6f2e3d1
to
b410a5e
Compare
type Item = I; | ||
type Error = BlockingError<E>; | ||
impl<I> Future for CpuFuture<I> { | ||
type Output = Result<I,Cancelled>; |
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.
type Output = Result<I,Cancelled>; | |
type Output = Result<I, Cancelled>; |
Err(err) => Err(BlockingError::Error(err)), | ||
} | ||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> { | ||
let rx = Pin::new(&mut Pin::get_mut(self).rx); |
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.
let rx = Pin::new(&mut Pin::get_mut(self).rx); | |
let rx = Pin::new(&mut Pin::get_mut(self).rx); |
I think this is not affected by readability.
@@ -19,7 +19,7 @@ path = "src/lib.rs" | |||
|
|||
[dependencies] | |||
derive_more = "0.15" | |||
futures = "0.1.25" | |||
futures = { package = "futures-preview", version = "0.3.0-alpha.18" } |
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.
futures = { package = "futures-preview", version = "0.3.0-alpha.18" } | |
futures-preview = "0.3.0-alpha.19" |
IMO: futures-preview
is more common?
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.
So, we should use futures 0.3.0
now
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.
0.3.1 actually is out for a hotfix
@semtexzv are you still working on this? Would you mind if I collaborate on this PR (so you'll give me access to your fork), or should I redo it from scratch as a separate PR? |
Just note that futures 0.3.0 is out |
superseded #59 |
Contains code to migrate actix-threadpool to std::future, overall progress tracked in #45.