Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
make our Lock classes uncopyable, make ReadLock and WriteLock moveable. #5209
Right now it is possible to copy our Lock classes, after which bad things will happen. Both destructors will attempt to unlock the mutex.
With this PR 1) copying becomes impossible 2) the ReadLock and WriteLock classes gain move support, which enables storing them in containers with expected semantics. This is good for having "thousands of locks" that exhibit RAII behaviour.