Improve flush()

This commit is contained in:
Sebastian Messmer 2015-09-30 13:17:35 +02:00
parent 8beb5bac0b
commit faa4b0c6f8

View File

@ -126,6 +126,9 @@ const Key &DataTree::key() const {
} }
void DataTree::flush() const { void DataTree::flush() const {
// By grabbing a lock, we ensure that all modifying functions don't run currently and are therefore flushed
unique_lock<shared_mutex> lock(_mutex);
// We also have to flush the root node
_rootNode->flush(); _rootNode->flush();
} }