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

Impossible to destroy a publisher #109

Closed
showier-drastic opened this issue Oct 21, 2024 · 3 comments
Closed

Impossible to destroy a publisher #109

showier-drastic opened this issue Oct 21, 2024 · 3 comments

Comments

@showier-drastic
Copy link
Contributor

Hi,

It seems that we cannot destroy a publisher created from the node, because the destroy function is private to the inner Publisher_ type. The only way to remove a publisher is to close the node.

Is it possible to add Drop to Publisher<T> so we can drop it when necessary?

@m-dahl
Copy link
Collaborator

m-dahl commented Oct 30, 2024

Hi,

You are right this functionality is missing. If I remember correctly it is like this is because the node should be the one destroying the publishers so that they can be shared between threads easily. But it seems that there is no function on the node for destroying a publisher either which there ought to be.

@m-dahl
Copy link
Collaborator

m-dahl commented Oct 30, 2024

Would the solution in #110 work for you? It does not implement drop but it was the simplest way to add the missing functionality.

@showier-drastic
Copy link
Contributor Author

Thanks for implementing this! Looks good to me.

@m-dahl m-dahl closed this as completed Nov 2, 2024
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

2 participants