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

Channel protocol class properties on closed channels #61

Open
awestendorf opened this issue Aug 22, 2014 · 0 comments
Open

Channel protocol class properties on closed channels #61

awestendorf opened this issue Aug 22, 2014 · 0 comments

Comments

@awestendorf
Copy link
Member

When a closed channel is accessed, the protocol classes are no longer bound, e.g. channel.basic. The reason for this is that they're cleaned up so that circular references can be quickly removed rather than waiting for the garbage collector.

One of the problems however is that the user has to either check for the closed state, or handle an ambiguous AttributeError, before calling channel.basic, etc. A better approach would be to replace the bindings with properties that raise the ChannelClosed exception on access.

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