Fix data race.
+ Add thread-safety with mutexes in `PieceTable` and `Buffer` + Bump version to 1.5.9
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
class PieceTable {
|
||||
@@ -181,4 +182,6 @@ private:
|
||||
|
||||
mutable RangeCache range_cache_;
|
||||
mutable FindCache find_cache_;
|
||||
|
||||
mutable std::mutex mutex_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user