Add a feature to create a hierarchy of event channels.
Channels can be forked into parent-child-relationships. "forked" is maybe not the best term, but it resembles forking of processes, which also results in a kind of hierarchy.
There are at least two possible semantics for this:
- Hierarchy. Events triggered on the parent channel, propagate down to all child-channels. Events triggered on child channels are not visible on the parent channel. In other words: Callbacks on the parent channel are only invoked by events on that same channel, while callbacks on the child channel can be invoked through events on both the child and the parent channel.
- Reverse-Hierarchy. Events triggered on the child channel, bubble up to the parent channel. Events triggered on the parent channel are not visible on the child channels. In other words: Callbacks on the child channel are only invoked by events on that same child channel, while callbacks on the parent channel can be invoked through events on any of its child channels (as well as those on the parent channel itself).
The first option seems to make more sense, but as I aim for multivents to be a highly flexible library, I can imagine implementing both semantics.
Similar considerations would apply to the semantics of locking and silencing channels.
Further possibilities to extend on this notion of a channel hierarchy are features for splitting child channels from the hierarchy tree and merging them back into it.
Add a feature to create a hierarchy of event channels.
Channels can be forked into parent-child-relationships. "forked" is maybe not the best term, but it resembles forking of processes, which also results in a kind of hierarchy.
There are at least two possible semantics for this:
The first option seems to make more sense, but as I aim for multivents to be a highly flexible library, I can imagine implementing both semantics.
Similar considerations would apply to the semantics of locking and silencing channels.
Further possibilities to extend on this notion of a channel hierarchy are features for splitting child channels from the hierarchy tree and merging them back into it.