-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Added try_recv & try_send to UnixDatagram #1677
Conversation
This seems fine to me. Looks like Ci is failing. Thoughts @tokio-rs/maintainers ? |
Seems like freebsd doesn't return WouldBlock for some reason. I'll output the specific errorkind to see what we get instead. |
3110a44
to
534224f
Compare
Turns out that freebsd &macos return |
534224f
to
054fdde
Compare
When is that needed? |
I'm passing serialized pointers to shared memory objects so I need to properly deallocate them when dropping the channel. |
054fdde
to
774bdc3
Compare
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 👍
This allows the user to send_to or recv_from from the socket without blocking. This is a continuation of tokio-rs#1677.
This allows the user to send_to or recv_from from the socket without blocking. This is a continuation of tokio-rs#1677.
I'm good w/ this. Could we fix the merge conflicts and I would ❤️ if the API docs could be padded out a bit and have an example. |
774bdc3
to
3ce0076
Compare
Almost forgot about this PR. I added the |
3ce0076
to
5c7d069
Compare
@jean-airoldie Sorry there has not been any new activity on this. It should still be good to go, but it looks like Once the build is passing again it should be 👍 |
5c7d069
to
6911d00
Compare
I'll rebase against master to see if this fixes it. If I run rustfmt on my machine I see nothing wrong. |
This allows nonblocking sync send & recv operations on the socket.
6911d00
to
ac6c91c
Compare
I manually edited it. Its weird that I doesn't show up on my machine because I'm using the same rustfmt version than the CI. |
@jean-airoldie When manually checking formatting I usually do CI seems to address this by passes all the files manually with a |
This would also make sense to add to the split |
This allows nonblocking sync send & recv operations on the socket.
Motivation
This is useful for draining the socket's buffer before dropping it. To do so, one would shutdown the writing end of the peer than
try_recv
until it errors.