Currently, dead senders can stay for a very long time in the hub. It would be nice to implement Drop for the receivers of the subscribers such that when the receiver is dropped it calls unsubscribe or an other special function to remove itself from the hub. But it is not that simple, because currently receivers does not have any trace of the hub, so we would have to wrap the current receivers, save a shared reference to the hub and then implement Drop to unsubscribe. Note that as unsubscribe takes the hub as mutable, we will probably need a mutex to handle this.
In another issue, I mentioned a mutex-wrapped hub, a hub wrapped in a mutex. Perhaps it would be a good idea to provide this feature only for this type of hub, as the receiver somehow needs to have a shared reference to the hub.
Currently, dead senders can stay for a very long time in the hub. It would be nice to implement Drop for the receivers of the subscribers such that when the receiver is dropped it calls unsubscribe or an other special function to remove itself from the hub. But it is not that simple, because currently receivers does not have any trace of the hub, so we would have to wrap the current receivers, save a shared reference to the hub and then implement Drop to unsubscribe. Note that as unsubscribe takes the hub as mutable, we will probably need a mutex to handle this.
In another issue, I mentioned a mutex-wrapped hub, a hub wrapped in a mutex. Perhaps it would be a good idea to provide this feature only for this type of hub, as the receiver somehow needs to have a shared reference to the hub.