| 1213 | |
| 1214 | template <typename T> |
| 1215 | Result<T> SyncVar<T>::try_read() { |
| 1216 | _lock.lock(); |
| 1217 | Result<T> result = _set ? Result<T>(_value) : Result<T>(); |
| 1218 | _lock.unlock(); |
| 1219 | return result; |
| 1220 | } |
| 1221 | |
| 1222 | template <typename T> |
| 1223 | bool SyncVar<T>::write(T value) { |