subscribe and unsubscribe issues
- Added unit tests to cover a few more cases which I my system ran into
under concurrent load testing.
- Remove and detect TNode, implement more of
http://bravenewgeek.com/breaking-and-entering-lose-the-lock-while-embracing-concurrency/
related to TNode state
- NOTE: The graph is left with nodes which have no subscriptions, the
TNode cleanup only cleanss the last node for now. We should
autoprune further up by placing more TNodes and pruning them off.
- Adding concurrency Sets and Lists to CNode, because those ARE edited
and read in parallel in our use-case. Before a CNode is CAS
replaced, more than 1 thread may be attempting to modify and read the
subscriptions and children CNode datastructures, and I hit this
during testing.
- Fixed an issue where we unsubscribe all sub-topics if an unsubscribe
is sent on a parent node.
- Fixed an issue with unsubscribing multiple times when no subscrition
exists, we should handle this gracefully.