template<typename T, typename RcuTraits>
class rcu::WritablePtr< T, RcuTraits >
Smart pointer for rcu::Variable<T> for changing RCU value. It stores a reference to a to-be-changed value and allows one to mutate the value (e.g. add items to std::unordered_map). Changed value is not visible to readers until explicit store by Commit. Only a single writer may own a WritablePtr associated with the same Variable, so WritablePtr creates a critical section. This critical section doesn't affect readers, so a slow writer doesn't block readers.
- Note
- you may not pass WritablePtr between coroutines as it owns engine::Mutex, which must be unlocked in the same coroutine that was used to lock the mutex.
Definition at line 290 of file rcu.hpp.