|
|
|
|
|
by jonathanlydall
480 days ago
|
|
What about spotting a cycle by using an incrementing counter and then throwing an exception if it goes above the tree depth or collection size (presuming one of these is tracked)? Unlike the author’s hash set proposal it would require almost no memory or CPU overhead and may be more likely to be accepted. That being said, in the decade plus I’ve used C# I’ve never found that I failed to consider concurrent access on data structures in concurrent situations. |
|