Skip to content

Would a BondSet class be useful? #99

@riv-tnoble

Description

@riv-tnoble

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions