Skip to content
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

Don't expose NetLocalHandle or make it !Send #8

Closed
wangrunji0408 opened this issue Mar 8, 2022 · 1 comment
Closed

Don't expose NetLocalHandle or make it !Send #8

wangrunji0408 opened this issue Mar 8, 2022 · 1 comment

Comments

@wangrunji0408
Copy link
Member

NetLocalHandle is the entry point of all network operations. However, it should not be sent to other threads. One thread using a handle from other thread would cause it to block forever. The current API design is likely to be misused. For example, users tend to store the handle in a global state. To prevent that, we should either hide this type and make its methods static, or make this type !Send.

@wangrunji0408
Copy link
Member Author

Removed in f014a65

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

1 participant