libpbd: provide a way to abort an RCU-based write_copy()->update() sequence

This commit is contained in:
Paul Davis
2021-01-01 18:27:28 -07:00
parent e653e61923
commit b96a2b1757

View File

@@ -184,11 +184,15 @@ public:
return new_copy;
/* notice that the write lock is still held: update() MUST
/* notice that the write lock is still held: update() or abort() MUST
* be called or we will cause another writer to stall.
*/
}
void abort () {
_lock.unlock();
}
bool update (boost::shared_ptr<T> new_value)
{
/* we still hold the write lock - other writers are locked out */