Skip to content

Change Incoming impls to only do one allocation #968

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

Merged
merged 1 commit into from
Mar 31, 2021
Merged

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Mar 31, 2021

This modifies net::tcp::Incoming and os::net::unix::Incoming to only do one allocation, rather than an allocation for each connection.

This modifies net::tcp::Incoming and os::net::unix::Incoming to only do
one allocation, rather than an allocation for each connection.
@erickt
Copy link
Contributor Author

erickt commented Mar 31, 2021

The powerpc cross compile seems unrelated to my change. It's erroring out on:

error[E0425]: cannot find value `SO_INCOMING_CPU` in crate `libc`
    --> /cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/socket2-0.4.0/src/sys/unix.rs:1201:69
     |
1201 |             getsockopt::<c_int>(self.inner, libc::SOL_SOCKET, libc::SO_INCOMING_CPU)
     |                                                                     ^^^^^^^^^^^^^^^ not found in `libc`

@skade
Copy link
Collaborator

skade commented Mar 31, 2021

What worries me a little is that all other unknown-linux-gnu were cancelled. Do you have a linux machine at hand currently? But yeah, I'm merging, this isn't related to your change.

@skade skade merged commit 2d27228 into async-rs:master Mar 31, 2021
@erickt erickt deleted the opt branch March 31, 2021 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants