|
|
|
|
|
by warmfuzzykitten
4455 days ago
|
|
Trivially, one could synchronize around the entire tree. However, if modified nodes are always copied, then the only node that matters is the root node (since there can never be a partially modified tree accessible from the root), which boils down to atomic update of a root node pointer. Should be very efficient. There is, of course, a performance implication of node copying, but it only affects add/delete/replace performance - read access runs at full speed - and it is cache-friendly, as well. |
|