Skip to content

Consider adding methods to GenericPort, GenericSmartChan to query whether the other side disconnected #6529

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

Closed
brson opened this issue May 16, 2013 · 3 comments

Comments

@brson
Copy link
Contributor

brson commented May 16, 2013

The try_recv and try_send methods will return whether the other end hung up, but there's no way to find this information in passing without potentially blocking. peek returns false when the sender has hung up without sending in order to maintain the invariant that whenever peek returns true there is data available.

So far I have not needed this functionality, so I'd suggest not adding it until somebody does.

@metajack
Copy link
Contributor

Instead of more methods, perhaps peek() should return an enum with three states.

@pnkfelix
Copy link
Member

visited for triage 16 july 2013. I would suggest closing this bug, and letting someone re-open it when/if such functionality is actually called for.

@alexcrichton
Copy link
Member

Closing in favor of #10459

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

No branches or pull requests

4 participants