sociomantic-tsunami / swarm

Asynchronous client/node framework library
Boost Software License 1.0
14 stars 26 forks source link

Remove vestigial ReceiveLoop.set? #327

Closed gavin-norman-sociomantic closed 5 years ago

gavin-norman-sociomantic commented 6 years ago

The set is only used by the methods to un/register for sending. These methods are not used internally in the receive loop, and are only called via the connection's methods to un/register for error notification. The only place that the return value of these methods is used is here, for a sanity check. So it looks like, aside from this one sanity check, the set and all associated methods are actually without function.

They can probably be removed.

gavin-norman-sociomantic commented 5 years ago

I'm not so sure about this now. ReceiveLoop.unregisterAll (which relies on the set) is called from shutdownImpl. I've not fully traced this through, but it seems like this is more than just a sanity check.

I'll close this issue, as the code isn't doing any harm as it is, and I don't want to spend time on tricky refactorings.