Updated the COW version of the CritBit to support atomic writes even when the tree has 0, 1 or 2 nodes.
This is done by keeping information like the size, root node reference and the root key/value references into a single object. This object can be updated atomically through a reference swap during the write methods.
Updated the COW version of the CritBit to support atomic writes even when the tree has 0, 1 or 2 nodes.
This is done by keeping information like the size, root node reference and the root key/value references into a single object. This object can be updated atomically through a reference swap during the write methods.