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

Would a BondSet class be useful? #99

Open
rr-tom-noble opened this issue Nov 13, 2024 · 0 comments
Open

Would a BondSet class be useful? #99

rr-tom-noble opened this issue Nov 13, 2024 · 0 comments

Comments

@rr-tom-noble
Copy link

rr-tom-noble commented Nov 13, 2024

In my use-case I have a node which manages a collection of bonds with other nodes. There's a few operations which naturally fit into a container class:

  • The ability to start / stop all bonds
  • The ability to check if all bonds have formed
  • The ability to add a callback when all bonds have formed
  • The ability to add a callback when at least one bond has broken
  • The ability to partition bond ids by their status i.e. return {formed_ids, unformed_ids}

I've implemented this as a custom class. I'm wondering if there'd be interest in adding it to the main codebase? I feel like this would simplify use-cases that work with multiple bonds by keeping the book-keeping code within a BondSet class.

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