-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update to futures 0.2 #1448
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
Comments
I'm super excited for this and would be interested in helping out! futures-0.2 is nearly code-complete, so we could probably get started soon. Do you have a branch you'd like PRs submitted to? |
There's a 0.12.x branch now on the repo where I've been trying to add new breaking changes to. |
Now that tokio 0.1 has landed in the 0.12.x branch, we should be able to attempt this. Is anyone working on this yet? Otherwise I'd have some time tomorrow to take a stab! |
Good news: So far I've got everything but the tests to compile. I'm using the
I'll try to find some time tonight to fix up the tests, and then this should be ready for review (fingers crossed). |
Tests compile now, however running into issues with iovec. Will investigate and (hopefully) fix tomorrow! |
@srijs just as a heads up, I've merged 0.12.x into master, will be deleting the 0.12.x branch so there's no confusion of the difference between master and 0.12.x. |
@srijs awesome work! |
Okay, I think I figured out the issue with Previously (iirc) With the new interface in From what I can see, we have multiple options now:
Conceivably we could also combine the approaches, e.g. go with Option 1 first and pursue Option 3 longer term. |
I've got a sketch for a possible (imo slightly hacky) detection algorithm based on For context, my logic to write a if !buf.has_remaining() {
return Ok(Async::Ready(0));
}
let n = {
static PLACEHOLDER: &[u8] = &[0];
let mut bufs = [From::from(PLACEHOLDER); 64];
let i = Buf::bytes_vec(&buf, &mut bufs[..]);
try_ready!(io.poll_vectored_write(cx, &bufs[..i]))
};
buf.advance(n);
return Ok(Async::Ready(n)); We could exploit our knowledge of what the default impl for If If If neither of these conditions apply, we can't be certain either way, and should keep using the current strategy (which is The big risk here is that we depend on the behaviour of default impl for |
@seanmonstar thanks for the heads-up, I'm rebasing now... @aturon thanks, let's make futures 0.2 a success! :) |
The PR can now be found here: #1470 |
It's not released yet, but this is just tracking that it needs to happen and is part of 0.12.
The text was updated successfully, but these errors were encountered: